Permalink
Browse files

refactored partials example

  • Loading branch information...
1 parent 66a6214 commit 7753d4e91d47447b9a607fa58201517532ce9e2b @tj tj committed Mar 2, 2011
@@ -3,7 +3,7 @@
* Module dependencies.
*/
-var express = require('./../../lib/express');
+var express = require('../../lib/express');
var app = express.createServer();
View
@@ -16,8 +16,8 @@ var pub = __dirname + '/public';
// and then serve with connect's staticProvider
var app = express.createServer(
- express.compiler({ src: pub, enable: ['sass'] }),
- express.staticProvider(pub)
+ express.compiler({ src: pub, enable: ['sass'] })
+ , express.static(pub)
);
// Optional since express defaults to CWD/views
@@ -11,7 +11,8 @@ h1= ninja.name
// the weapons array or "collection"
ul!= partial('weapon', ninja.weapons)
-// partial name 'victim_name' resolves to '_victim_name.jade' file and 'victimName' object
+// partial name 'victim' resolves to 'victim.jade'
+// or 'victim/index.jade', providing the "victim" local
#victims
h2 Victims
- ul!= partial('victim_name', ninja.victims)
+ ul!= partial('victim', ninja.victims)
@@ -0,0 +1 @@
+li.victim= victim
@@ -1 +0,0 @@
-li.victim= victimName

0 comments on commit 7753d4e

Please sign in to comment.