我試圖建立一些簡單的步兵任務,但在運行當中,我得到在終端中的警告。「警告:任務‘默認’找不到咕嚕:任務「默認」未找到
我簡化了gruntfile下降到只有一個任務,以減少機會,這是由語法錯誤引起的,但我仍然得到同樣的警告......
gruntfile.js
exports.module = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
build: {
files: {
'/public/scripts/test.min,js' : ['/public/scripts/test.js']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['uglify']);
};
的package.json
{
"name": "CustomersCRUD",
"version": "0.0.1",
"description": "Customer CRUD Application",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Dan Hutchinson",
"license": "ISC",
"dependencies": {
"express": "^4.6.1",
"serve-favicon": "^2.0.1"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-uglify": "^0.5.0"
}
}
給予警告
Warning: Task "default" not found. Use --force to continue.
Aborted due to warnings.
非常感謝!
斑點!不幸的是,這還沒有解決問題 – dhutchinson