我正在尝试使用grunt编译我的玉石文件用于SPA,它可以工作......好吧,“有效...”
我的文件夹:
和我的gruntfile.coffee任务:
jade:
compile:
options:
pretty: true
files:
[
extend: true
flatten: true
cwd: 'app/views'
src: '**/*.jade'
dest: 'app/views/build'
ext: '.html'
]
compileIndex:
options:
pretty: true
files: 'app/index.html': ['app/index.jade']
好吧,我在这里读到了另一个问题,比如Grunt compiling Jade files,但我可以让它工作正常,当我尝试运行咕噜翡翠时,会发生两件事; compileIdex完全正常,但是,当编译任务运行时:
Running tasks: jade:compile
Running "jade:compile" (jade) task
Verifying property jade.compile exists in config...OK
Files: prueba.jade -> app/views/build
Options: namespace="JST", separator="\n\n", amd=false, pretty
>> Source file "prueba.jade" not found.
>> Destination not written because compiled files were empty.
那我在这里做错了什么?我需要保留单独的编译,索引和视图。