Files
pugz/tests/sample_data/pug/examples/rss.js

29 lines
533 B
JavaScript
Raw Normal View History

2026-01-24 23:53:19 +05:30
/**
* Module dependencies.
*/
var pug = require('../'),
path = __dirname + '/rss.pug',
str = require('fs').readFileSync(path, 'utf8'),
fn = pug.compile(str, {filename: path, pretty: true});
var items = [];
items.push({
title: 'Example',
description: 'Something',
link: 'http://google.com',
});
items.push({
title: 'LearnBoost',
description: 'Cool',
link: 'http://learnboost.com',
});
items.push({
title: 'Express',
description: 'Cool',
link: 'http://expressjs.com',
});
console.log(fn({items: items}));