react-components-docs/sass环境依赖解决.md

31 lines
1008 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# sass环境依赖
## 安装Ruby
sass依赖Ruby环境所以需要先安装Ruby
- 下载地址[http://rubyinstaller.org/downloads](http://rubyinstaller.org/downloads)
- 注意事项安装时最好勾选Add Ruby executables to your PATH这个选项添加环境变量。
- 查看ruby是否正确安装在命令窗口使用ruby -v查看版本号来确认是否正确安装
## 安装gulp-sass
generator-tinper-bee是我们编写组件的脚手架产出工具它产出的脚手架使用gulp-sass编译sass
gulp-sass依赖于node-sassnode-sass由于某些网络原因我们可能无法下载
所以请使用cnpm下载node-sass
```
npm install -g cnpm
cnpm install --save-dev node-sass
```
接着下载gulp-sass
```
cnpm install --save-dev gulp-sass
```
## sass用法
请移步参考:
[http://www.w3cplus.com/sassguide/](http://www.w3cplus.com/sassguide/)
[http://sass-lang.com/documentation/file.SASS_REFERENCE.html](http://sass-lang.com/documentation/file.SASS_REFERENCE.html)