例如编译这个文件夹结构,
x.styl
|--abc/
|--|--a.styl
|--efg/
|--|--b.styl
至
build/
|--x.css
|--abc/
|--|--a.css
|--efg/
|--|--b.css
使用 stylus 编译器(从文件夹及其子文件夹编译 styl 文件)
最佳答案
您可以在构建和定位整个文件夹时使用 --out 参数,它将保留您的结构,首先您可以定位文件或文件夹,然后在您想要编译的 css 的文件夹或文件名之后
stylus -c ./project/stylus --out ./myfolder/css
对于:
|stylus
|--abc/
|--|--a.styl
|--efg/
|--|--b.styl
这会导致类似的结果:
|css
|--abc/
|--|--a.css
|--efg/
|--|--b.css
关于css - 编译给定文件夹及其子文件夹中的所有手写笔文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45478963/