Skip to content

Commit

Permalink
Fixed mixins example
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 26, 2011
1 parent 35d00d2 commit 171c7ad
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions examples/mixins.js
Expand Up @@ -3,16 +3,14 @@
* Module dependencies.
*/

var jade = require('./../lib/jade');
var jade = require('./../')
, path = __dirname + '/mixins.jade'
, str = require('fs').readFileSync(path, 'utf8')
, fn = jade.compile(str, { filename: path, pretty: true });

var user = {
name: 'tj'
, pets: ['tobi', 'loki', 'jane', 'manny']
};

var options = { locals: { user: user }};

jade.renderFile(__dirname + '/mixins.jade', options, function(err, html){
if (err) throw err;
console.log(html);
});
console.log(fn({ user: user }));

0 comments on commit 171c7ad

Please sign in to comment.