有没有什么能快速将所有项目.styl(stylus)文件更改为scss或css?像控制台命令或什么?因为我必须编辑哪些样式在.styl中的项目,这真的让人感到困惑。现在谁做到了?
跑:
1) ng config defaults.styleExt=scss
2) Rename your existing .css/stylus files to .scss
不确定是否仍然相关,但使用以下脚本,您可以将所有.styl
文件重命名为.scss
(相应地调整为./css
)
##!/bin/bash
for file in $(find ./src -type f -name "*.styl");
do
echo "$file";
mv -- "$file" "${file%.styl}.scss"
done
繁忙的部分是确保更改所有手写笔语法以匹配sass语法。希望这可以帮助