0
我有我的gruntfile这个任务:分裂了gruntfile
jade: {
compile: {
options: {
client: false,
pretty: true,
data: {
section: grunt.file.readJSON('json/section.json')
}
},
files: [ {
cwd: "app/views",
src: "**/*.jade",
dest: "build/templates",
expand: true,
ext: ".html"
} ]
}
}
然而,当我这个片段添加到一个js文件jade.js像这样:
module.exports = {
compile: {
options: {
client: false,
pretty: true,
data: {
section: grunt.file.readJSON('json/section.json')
}
},
files: [ {
cwd: "app/views",
src: "**/*.jade",
dest: "build/templates",
expand: true,
ext: ".html"
} ]
}
}
我得到的错误的ReferenceError:咕噜没有定义
虽然我具有以下设置:
aliases.yaml
default:
- 'jade'
- 'sass'
- 'watch
文件夹结构
/grunt
aliases.yaml
jade.js
sass.js
watch.js
Gruntfile.js
module.exports = function(grunt) {
// load grunt config
require('load-grunt-config')(grunt);
};
我已经安装了load-grunt-config和load-grunt-tasks。
你的先生是一个真正的英雄!我向你们致敬。 – user1937021