美文网首页
node-sass使用文档

node-sass使用文档

作者: 一枚程序员的灵感 | 来源:发表于2017-09-29 16:46 被阅读1531次

1,安装(前提是node、cnpm安装好):

  >> $ cnpm install -g node-sass

2,检查是否安装成功

  >> $ node-sass -v

3,sass文件监视器的创建:

 1>,cd+路径   (推荐用git,简单方便)

 2>,dir   (查看当前文件夹下有哪些文件)

 3>,node-sass -w xxx.scss xxx.css --output-style expanded   (监听命令)

4,SASS提供四个编译风格的选项:

* nested:嵌套缩进的css代码,它是默认值。

* expanded:没有缩进的、扩展的css代码。

* compact:简洁格式的css代码。

* compressed:压缩后的css代码。

# 生产环境当中,一般使用最后一个选项。

---end.

相关文章

网友评论

      本文标题:node-sass使用文档

      本文链接:https://www.haomeiwen.com/subject/hogiextx.html