Loading "Gruntfile.js" tasks...ERROR 总是出现这个问题,找不到原
i'm getting the following error when trying to run grunt;
I was wondering if anyone might be able to help me correct this?
Here's my Gruntfile:
module.exports = function(grunt) { grunt.initConfig({ pkg:grunt.file.readJSON('package.json'), //uglify uglify:{ options: { stripBanners:true, banner: '/*! -.js */\n' }, build: { src: 'src/test.js', dest: 'build/-.min.js' } }, //jshint jshint:{ build: [ 'Gruntfile.js', 'src/*.js'], options: { jshintrc: '.jshintrc' } }, //cssmin cssmin:{ build:[ 'src/*.css'], options:{ csslintrc: '.csslintrc' } } //watch watch: { build: { files: ['src/*.js', 'src/*.css'], tasks: ['jshint', 'uglify'], options: { spawn: false} } } }); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', ['jshint', 'cssmin', 'uglify', 'watch']);}; |
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|