Files
2014-12-26 17:02:29 +08:00

36 lines
867 B
JavaScript

module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat:{
options:{
separator: ';'
},
dist:{
src:[
'./js/tip.js',
'./lib/main.js',
'./lib/services/**/*.js',
'./lib/controllers/**/*.js'
],
dest:'./build/main.js'
}
},
uglify: {
options: {
//头部
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
dist: {
src: './build/main.js',
dest: './build/main.min.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['concat', 'uglify']);
};