node-query/node_modules/nodeunit/deps/ejs/examples/list.js

16 lines
242 B
JavaScript
Raw Normal View History

2014-10-20 16:56:45 -04:00
/**
* Module dependencies.
*/
var ejs = require('../')
, fs = require('fs')
, str = fs.readFileSync(__dirname + '/list.ejs', 'utf8');
var ret = ejs.render(str, {
locals: {
names: ['foo', 'bar', 'baz']
}
});
console.log(ret);