pixsy/node_modules/pug/examples/form.js

18 lines
338 B
JavaScript
Raw Normal View History

2017-12-22 17:22:08 +00:00
/**
* Module dependencies.
*/
var pug = require('../')
, path = __dirname + '/form.pug'
, str = require('fs').readFileSync(path, 'utf8')
, fn = pug.compile(str, { filename: path, pretty: true });
var user = {
name: 'TJ',
email: 'tj@vision-media.ca',
city: 'Victoria',
province: 'BC'
};
console.log(fn({ user: user }));