2015-11-04 67 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'); 

這應該有效。