码迷,mamicode.com
首页 > Web开发 > 详细

haml scss转换编写html css的前期工作

时间:2015-05-06 13:01:40      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:

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

--- --- --- --- --- ----
查看文件 |
--- --- --- --- --- ----

haml scss转换编写html css的前期工作

标签:

原文地址:http://www.cnblogs.com/hao5599/p/4481389.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!