1 Star 0 Fork 0

李春林/lockr

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gruntfile.js 1.85 KB
一键复制 编辑 原始数据 按行查看 历史
Dimitris Tsironis 提交于 2014-01-19 13:35 . Adds uglification task in Grunt
/*global module:false */
module.exports = function(grunt) {
// we should add tests
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
// Task configuration.
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
unused: true,
boss: true,
eqnull: true,
browser: true,
globals: {
jQuery: true
}
},
gruntfile: {
src: 'Gruntfile.js'
}
},
jasmine: {
src: 'lockr.js',
options: {
specs: 'specs/lockrSpecs.js',
keepRunner: true
}
},
uglify: {
options: {
mangle: false
},
lockr: {
files: {
'lockr.min.js': ['lockr.js']
}
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
js: {
files: [
'lockr.js',
'specs/**/*.js'
],
tasks: ['specs']
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task.
grunt.registerTask('default', 'specs');
grunt.registerTask('specs', ['jshint', 'jasmine', 'uglify']);
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nbnat/lockr.git
git@gitee.com:nbnat/lockr.git
nbnat
lockr
lockr
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385