2015-11-04 66 views
0

当我用下面的Gruntfile运行咕噜声时,出现错误Warning:task“jade”not found。这里究竟会有什么错误?运行咕噜声时找不到任务玉

module.exports = function(grunt) { 
    grunt.initConfig({ 

     jade: { 
     compile: { 
      options: { 
       client: false, 
       pretty: true 
      }, 
      files: [ { 
       cwd: "app/views", 
       src: "**/*.jade", 
       dest: "build/templates", 
       expand: true, 
       ext: ".html" 
      } ] 
     } 
    } 
    }); 

    grunt.registerTask('default','Convert Jade templates into html templates', 
        ['jade','watch']); 
    grunt.loadNpmTasks('grunt-contrib-watch'); 
}; 

回答

2

您需要加载grunt jade任务。与哟相同加入grunt-contrib-watch

grunt.loadNpmTasks('grunt-contrib-jade'); 

这应该有效。