当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
20 Star 46 Fork 14

干煸小黄鱼儿/angular-BMap
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Gruntfile.js 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
douxc 提交于 2015-06-14 11:52 +08:00 . 添加默认中心点设置
module.exports = function (grunt) {
var sources = ['./src/*.js'],
html = ['./html/*.html'];//源文件
// 任务配置
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
scripts: {
tasks: ['uglify'],
files: sources
}
},
jshint: {
all: sources
},
uglify: {
options: {
mangle: true,
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
files: {
'dist/angular-bmap.min.js': sources
}
}
},
concat: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> */\n' +
'(function(){\n',
footer: '\n})();'
},
build: {
files: {
'output/js/output.js': sources
}
}
},
htmlmin: {
options: {
removeComments: true,
collapseWhitespace: true,
conservativeCollapse: true,
collapseBooleanAttributes: true,
removeCommentsFromCDATA: true,
removeOptionalTags: true
},
build: {
files: [{
expand: true,
src: html,
dest: 'output/'
}]
}
},
jsdoc2md: {
withOptions: {
options: {
"no-gfm": true
},
src: "src/*.js",
dest: "api/with-index.md"
}
}
});
// 任务加载
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks("grunt-jsdoc-to-markdown");
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/douxc/angular-BMap.git
git@gitee.com:douxc/angular-BMap.git
douxc
angular-BMap
angular-BMap
master

搜索帮助