我是新来的咕噜咕噜,还在找我的脚。
我安装了grunt并使用
进行了uglifynpm install grunt-contrib-uglify --save-dev
我在gruntfile.js中有以下内容来测试缩小css文件
// Code example 01-minify
module.exports = function(grunt) {
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
// Project configuration.
grunt.initConfig({
uglify: {
target1: {
src: 'styles.css',
dest: 'styles.min.css'
}
}
});
// Define the default task
grunt.registerTask('default', ['uglify']);
};
如果我运行grunt
,我会
Local Npm module "grunt-contrib-uglify" not found. Is it installed?
Warning: Task "uglify" not found. Use --force to continue.