http://www.w3cplus.com/sassguide/install.html
先下载ruby
$ gem sources
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/
$ gem sources -1
$ gem install haml
$ gem install scss
$ gem install sass
$ gem install rails
$ gem install compass
$ compass -v
$gem install hpricot ---html转换haml
$ html2haml index.html index.haml
--- --- --- --- --- ----
添加目录 |
--- --- --- --- --- ----
mkdir css 添加
rmdir css 删掉
--- --- --- --- --- ----
添加目录 |
--- --- --- --- --- ----
--- --- --- --- --- ----
scss转换 |
--- --- --- --- --- ----
$ cd\
$ cd scss
//scss目录有一个scss
$ scss --watch style.scss:style.css
//scss目录的scss已经转换为css了
--- --- --- --- --- ----
scss转换 |
--- --- --- --- --- ----
--- --- --- --- --- ----
haml转换 |
--- --- --- --- --- ----
$ cd\
$ cd haml
//haml目录有一个scss
$ haml style.haml style.html
//haml目录的haml已经转换为haml了
--- --- --- --- --- ----
haml转换 |
--- --- --- --- --- ----
--- --- --- --- --- ----
html转换 |
--- --- --- --- --- ----
$ cd\
$ cd html
//html目录有一个index.html
$ html2haml index.html:index.haml
//html目录的index.html已经转换为haml了
--- --- --- --- --- ----
html转换 |
--- --- --- --- --- ----
--- --- --- --- --- ----
退出目录 |
--- --- --- --- --- ----
cd...
cd: css/
_
_
ctrl + c
--- --- --- --- --- ----
退出目录 |
--- --- --- --- --- ----
--- --- --- --- --- ----
查看文件 |
--- --- --- --- --- ----
$ cd\
$ cd web
$ type index.scss
$ scss --watch index.scss:index.css
--- --- --- --- --- ----
查看文件 |
--- --- --- --- --- ----
更多专业前端知识,请上
【猿2048】www.mk2048.com