pixsy/node_modules/pug/examples/dynamicscript.js

17 lines
310 B
JavaScript
Raw Normal View History

2017-12-22 17:22:08 +00:00
/**
* Module dependencies.
*/
var pug = require('../');
var locals = {
users: {
tj: { age: 23, email: 'tj@vision-media.ca', isA: 'human' },
tobi: { age: 1, email: 'tobi@is-amazing.com', isA: 'ferret' }
}
};
var fn = pug.compileFile(__dirname + '/dynamicscript.pug');
console.log(fn(locals));