1
雖然在代碼中似乎都是正確的,但我收到了錯誤。有人可以幫忙嗎?grunt uglify顯示錯誤
gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
//Setting up some base links
meta: {
basePath: '../'
},
//Reading package.json file
pkg: grunt.file.readJSON('package.json'),
// Concat Configuration
concat: {
options: {
separator: ';'
},
dist: {
src: ['<%= meta.basePath %>scripts/*.js'],
dest: '<%= meta.basePath %>scripts/concated.js'
}
},
// Uglify Configuration
uglify: {
build: {
src: ['<%= meta.basePath %>scripts/concated.js'],
dest: '<%= meta.basePath %>scripts/uglify.js'
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-concat','grunt-contrib-uglify');
// Default task
grunt.registerTask('default', ['concat','uglify']);
};
錯誤
已經看到了鏈接:
grunt uglify task failing
new to grunt - warning: task "concat, uglify" not found
但是,「grunt concat」運行良好並提供結果。沒有問題。但這種醜化似乎造成了很大的痛苦。
悲哀!沒有人幫助我? – Deadpool