pixsy/node_modules/pug/examples/code.js

16 lines
385 B
JavaScript
Raw Normal View History

2017-12-22 17:22:08 +00:00
/**
* Module dependencies.
*/
var pug = require('../')
, path = __dirname + '/code.pug'
, str = require('fs').readFileSync(path, 'utf8')
, fn = pug.compile(str, { filename: path, pretty: true });
var users = {
tj: { age: 23, email: 'tj@vision-media.ca', isA: 'human' },
tobi: { age: 1, email: 'tobi@is-amazing.com', isA: 'ferret' }
};
console.log(fn({ users: users }));