mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Update README.md
This commit is contained in:
parent
d7271a783b
commit
b65c90c247
11
README.md
11
README.md
@ -18,14 +18,15 @@ var stream = through(function write(data) {
|
||||
output += data;
|
||||
});
|
||||
|
||||
var context = require('raptor-render-context').create(stream);
|
||||
var context = require('raptor-render-context').create(stream)
|
||||
.on('error', function(err) {
|
||||
// Something went wrong during rendering
|
||||
})
|
||||
.on('end', function() {
|
||||
// Value of output: "ABC"
|
||||
})
|
||||
.write('A');
|
||||
});
|
||||
|
||||
context.write('A');
|
||||
|
||||
var asyncContext = context.beginAsync();
|
||||
setTimeout(function() {
|
||||
@ -34,6 +35,6 @@ setTimeout(function() {
|
||||
}, 1000);
|
||||
|
||||
|
||||
context.write('C')
|
||||
.end();
|
||||
context.write('C');
|
||||
context.end();
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user