考虑以下目录结构和文件查找:
静态/
..手写笔/
.. css /
files: [
{
expand: true,
cwd: 'static/',
src: ['**/*.styl'],
dest: 'css/',
ext: '.css',
},
],
我想要的是抓取stylus/
dir中的所有 [*。styl] 文件,将每个文件编译成CSS并将结果文件放入css/
目录。但我的模式使编译文件存在于static/stylus/css/
目录中。我该如何解决这个问题?
答案 0 :(得分:0)
files: [
{
expand: true,
// enable flatten if you want all files put into a single folder
flatten: true,
// specify the portion of the src folder you dont want to appear in the dest
cwd: 'static/stylus/',
src: ['**/*.styl'],
dest: 'css/',
ext: '.css',
},
],