Browse files

Fixed layout example

  • Loading branch information...
1 parent 171c7ad commit 421594f793a87b93a68f4952787c062f4782b0c9 @tj tj committed Sep 26, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 examples/layout.js
View
10 examples/layout.js
@@ -3,9 +3,9 @@
* Module dependencies.
*/
-var jade = require('./../lib/jade');
+var jade = require('./../')
+ , path = __dirname + '/layout.jade'
+ , str = require('fs').readFileSync(path, 'utf8')
+ , fn = jade.compile(str, { filename: path, pretty: true });
-jade.renderFile(__dirname + '/layout.jade', function(err, html){
- if (err) throw err;
- console.log(html);
-});
+console.log(fn());

0 comments on commit 421594f

Please sign in to comment.