我是 Grunt 的新手,我正在尝试将它与此配置一起使用
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Define our source and build folders
js_src_path: 'javascripts',
js_build_path: "build/js",
// Grunt Tasks
concat: {
options:{
separator: ';'
},
js: {
src: ['<%= js_src_path %>/*.js'],
dest: '<%= js_build_path %>/app.js'
} },
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
js: {
src: '<%= concat.js.dest %>',
dest:'<%= js_build_path %>/app.min.js'
}
}
}
);
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task.
grunt.registerTask('default', ['concat', 'uglify']);
};
但我有这个消息:
Running "concat:js" (concat) task
File "build/js/app.js" created.
Running "uglify:build" (uglify) task
>> Uglifying source "build/js/app.js" failed.
Warning: Uglification failed. Use --force to continue.
Aborted due to warnings.
我的配置有什么问题吗?
谢谢