すべての Jade ファイルを個々の HTML ファイルにコンパイルするように Gruntfile を構成しようとしています。たとえば、次のソース フォルダーがあるとします。
source
└── templates
├── first.jade
├── second.jade
└── third.jade
次に、出力することを期待grunt jade
します:
build
└── templates
├── first.html
├── second.html
└── third.html
これが私のGruntfilegrunt-contrib-jade
です:
module.exports = function(grunt) {
grunt.initConfig({
jade: {
compile: {
options: {
client: false,
pretty: true
},
files: [ {
src: "*.jade",
dest: "build/templates/",
ext: "html",
cwd: "source/templates/"
} ]
}
},
});
grunt.loadNpmTasks("grunt-contrib-jade");
};
ただし、 jade コマンドを実行すると、次のエラーが発生します。
Running "jade:compile" (jade) task
>> Source file "first.jade" not found.
>> Source file "second.jade" not found.
>> Source file "third.jade" not found.
私は何を間違っていますか?