使用stylus

mac2022-06-30  26

 

 

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)

更多专业前端知识,请上 【猿2048】www.mk2048.com
最新回复(0)