Просмотр исходного кода

add docs for the streaming API

tags/0.2.2
Jan Lehnardt 16 лет назад
Родитель
Сommit
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


Загрузка…
Отмена
Сохранить