Created
November 16, 2015 03:47
-
-
Save CooLNuanfeng/b47ce653d3d39877242a to your computer and use it in GitHub Desktop.
Jade 简单使用示例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###Jade 简单使用示例 | |
####**安装** | |
`npm install jade -g` | |
####**指令** | |
`jade --help` | |
####**编译** | |
`jade -P *.jade` | |
####**常用示例** | |
doctype html | |
html | |
title test | |
include block/links | |
style. | |
.container{ | |
color: red; | |
} | |
body | |
| <h1>Title</h1> | |
| <p>foo bar baz</p> | |
p. | |
halj就阿斯利康的房价就按垃圾地方 | |
设计的风口浪尖啊了 sjhdfajl | |
- var foo = 'bar'; | |
- if(foo) | |
ul | |
li = yal | |
li jskjf | |
li= foo | |
li #{foo} | |
- else | |
p oh no! | |
- var array = ['a','b','c'] | |
ul | |
each item, i in array | |
li #{item} ==> #{i} | |
script. | |
if(foo){ | |
bar(); | |
}else{ | |
baz(); | |
} | |
#box.container(data-name="blue") hello world | |
文件目录结构如下 | |
. | |
├── block | |
│ └── links.jade | |
├── test.html | |
└── test.jade | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment