Permalink
Browse files

jade example in progress

  • Loading branch information...
1 parent 645dfc4 commit 73ffa44fdbb1cc2ed32e1497982b02e5aa049b37 @substack committed May 28, 2011
No changes.
@@ -0,0 +1,19 @@
+var express = require('express');
+var app = express.createServer();
+app.use(express.static(__dirname + '/static'));
+app.listen(8080);
+console.log('Listening on 8080');
+
+app.get('/', function (req, res) {
+ res.render('index.jade', { layout : false });
+});
+
+var browserify = require('browserify');
+var bundle = browserify({
+ entry : __dirname + '/js/main.js',
+ require : [ 'jade' ]
+});
+app.use(bundle);
+
+var browserifyFile = require('browserify-file');
+bundle.use(browserifyFile('views', __dirname + '/views'));
No changes.
@@ -0,0 +1,7 @@
+!!!
+head
+ title browserify-file jade demo
+ link(rel='stylesheet', href='/site.css')
+ script(type='text/javascript', src='/browserify.js')
+body
+ h1 Here is some stuff:
@@ -0,0 +1,3 @@
+div.stuffing
+ div.title #{title}
+ div.body #{body}

0 comments on commit 73ffa44

Please sign in to comment.