Loading "Gruntfile.js" tasks...ERROR 总是出现这个问题,找不到原因,求助

i'm getting the following error when trying to run grunt;

http://img.mukewang.com/597864710001ce0504940108.jpg

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: '/*! <%= pkg.name %>-<%=pkg.version%>.js <%= grunt.template.today("yyyy-mm-dd") %> */\n'
            },
            build: {
              src: 'src/test.js',
              dest: 'build/<%= pkg.name %>-<%=pkg.version%>.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']);

};
慕丝0395080
浏览 3912回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP