Skip to content

add helper functions at compile time#190

Open
vycb wants to merge 1 commit intotj:masterfrom
vycb:develop
Open

add helper functions at compile time#190
vycb wants to merge 1 commit intotj:masterfrom
vycb:develop

Conversation

@vycb
Copy link

@vycb vycb commented Sep 29, 2014

No description provided.

@vycb
Copy link
Author

vycb commented Feb 28, 2015

For example:
var index = ejs.compile(fs.readFileSync(__dirname + '/pub/index.html', 'utf8'),
{delimiter: '?', helpers: {echohtml: function(s){return s+" echohtml!"}}})

res.end(index({varhello: "Hello nodejs!"}));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant