Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "nephrite", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": "Nami-Doc", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -38,3 +38,3 @@ Nephrite | ||
```js | ||
```coffee | ||
# compile it | ||
@@ -51,11 +51,14 @@ nephrite = require 'nephrite' | ||
The syntax is the same as Jade, with a few gotchas : | ||
- Don't prefix your tags with `-`. `-` is jade interpolation, to allow for even better perfs on static content : | ||
- Don't prefix your tags with `-`, it's jade interpolation, to allow for even better perfs on static content : | ||
```jade | ||
ul#pages | ||
- for (var i = 0; i <= 10; ++i) | ||
li(page=i)== i | ||
li: a(page=i)== i | ||
``` | ||
- The jade output is `==`. This will be optimized (compiled by jade) | ||
for tags, see just below. | ||
- The jade output is `==` (as seen just before). This is executed compile-time (by jade). | ||
- Tags are automatically recognized. | ||
@@ -66,4 +69,4 @@ Currently supported tags are : `if`, `unless`, `while`, `for`, `else`. | ||
- To avoid complexity in the converter, for attribute interpolation you have to explicitely interpolate them : | ||
`a(href=foo) Foo!` will use jade | ||
`a(href="#{foo}") Foo!` will use | ||
`a(href=foo) Foo!` will use jade (compile time), | ||
`a(href="#{@foo}") Foo!` will use your `locals.foo` (runtime). | ||
@@ -70,0 +73,0 @@ - The "silent code interpolation" is `~` |
Sorry, the diff of this file is not supported yet
6671
81