From b56edf51b7436c0bd9ba659c19a108d785eba8f6 Mon Sep 17 00:00:00 2001 From: Patrick Steele-Idem Date: Mon, 5 May 2014 14:40:40 -0600 Subject: [PATCH] Minor updates --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 10ed9ce4d..15f762323 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ The template can then be rendered as shown in the following sample code: ```javascript var templatePath = require.resolve('./hello.rhtml'); var template = require('raptor-templates').load(templatePath); + template.render({ name: 'World', colors: ["red", "green", "blue"] @@ -206,6 +207,7 @@ npm install raptor-templates --global ### Callback API ```javascript var template = require('raptor-templates').load('template.rhtml'); + template.render({ name: 'Frank', count: 30 @@ -239,6 +241,7 @@ template.stream({ ```javascript var raptorTemplates = require('raptor-templates'); var template = raptorTemplates.load('template.rhtml'); + var out = require('fs').createWriteStream('index.html', 'utf8'); var context = raptorTemplates.createContext(out);