瀏覽代碼

add docs for the streaming API

tags/0.2.2
Jan Lehnardt 16 年之前
父節點
當前提交
95509c585b
共有 3 個文件被更改,包括 9 次插入2 次删除
  1. +1
    -1
      CHANGES.md
  2. +7
    -0
      README.md
  3. +1
    -1
      mustache.js

+ 1
- 1
CHANGES.md 查看文件

@@ -1,7 +1,7 @@
# mustache.js Changes

## 0.2 (??-??-????)
* add streaming api
* ctemplate compat: Partials are indicated by >, not <.
* Add support for {{%PRAGMA}} to enable features.
* Made array of strings an option. Enable with `{{%JSTACHE-ENABLE-STRING-ARRAYS}}`.


+ 7
- 0
README.md 查看文件

@@ -91,6 +91,13 @@ mustache.js does escape all values when using the standard double mustache synta

Example: Using `{{variable}}` inside a template for `5 > 2` will result in `5 &gt; 2`, where as the usage of `{{{variable}}}` will result in `5 > 2`.

## Streaming
To stream template results out of mustache.js, you can pass an optional `send()` callback to the `to_html()` call:

Mustache.to_html(template, view, partials, function(line) {
print(line);
});


## More Examples and Documentation
See `examples/` for more goodies and read the [original mustache docs][m]


+ 1
- 1
mustache.js 查看文件

@@ -265,7 +265,7 @@ var Mustache = function() {

return({
name: "mustache.js",
version: "0.3a",
version: "0.2a",

/*
Turns a template and view into HTML


Loading…
取消
儲存