Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed mixins example

  • Loading branch information...
commit 171c7ad28944e61b32dba005687cab588f56712d 1 parent 35d00d2
@tj tj authored
Showing with 5 additions and 7 deletions.
  1. +5 −7 examples/mixins.js
View
12 examples/mixins.js
@@ -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 }));
Please sign in to comment.
Something went wrong with that request. Please try again.