1. 首先确保 node + npm 环境一切正常。
2. 全局安装 stylus:
在命令行中: npm i stylus@latest -g
3. 此时可以创建 .styl 文件, 并进行编辑。
4. 使用命令 将 .styl 文件 编译为 .css 文件:
stylus -c path/to/index.styl path/to/index.css (单一文件)
stylus -c path/to/styl/ (编译文件夹内所有的styl)
本文共 289 字,大约阅读时间需要 1 分钟。
1. 首先确保 node + npm 环境一切正常。
2. 全局安装 stylus:
在命令行中: npm i stylus@latest -g
3. 此时可以创建 .styl 文件, 并进行编辑。
4. 使用命令 将 .styl 文件 编译为 .css 文件:
stylus -c path/to/index.styl path/to/index.css (单一文件)
stylus -c path/to/styl/ (编译文件夹内所有的styl)
转载于:https://www.cnblogs.com/Skate0rDie/p/9993500.html