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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值