4 Star 4 Fork 0

成亮 / pmideation-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Gruntfile.js 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
成亮 提交于 2016-01-22 09:50 . commit
module.exports = function(grunt) {
grunt.initConfig({
// 读取package配置
pkg: grunt.file.readJSON('package.json'),
// js语法检查
jshint: {
files: ['Gruntfile.js', 'public/js/**/*.js'],
options: {
// 控制分号的警告
asi: true,
boss: true,
// 控制url中return false的警告
scripturl: true,
// 绝对等于的警告
eqeqeq: false,
loopfunc: true,
// 这个选项用于抑制表达式相关的一些错误信息
expr: true,
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
},
// js压缩
uglify: {
options: {
//不混淆变量名
mangle: false,
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
build: {
files:[
{
expand: true,
cwd: 'public',
src: 'public/js/**/*.js'
}
]
}
}
});
// 加载grunt插件
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
// 注册插件
grunt.registerTask('default', ['jshint', 'uglify']);
};
JavaScript
1
https://gitee.com/zhangcl315/pmideation-web.git
git@gitee.com:zhangcl315/pmideation-web.git
zhangcl315
pmideation-web
pmideation-web
master

搜索帮助