With latest libraries, functions renderStyleTags and renderScriptTags are undefined in the example template
raimo opened this issue · 2 comments
raimo commented
This is the result of making a request from an actual browser:
TypeError: undefined is not a function
at Object.render (/Users/raimo/proj/node_modules/jade/lib/jade.js:202:5)
at ServerResponse.render (/Users/raimo/proj/node_modules/express/lib/express/view.js:334:22)
at Object.<anonymous> (/Users/raimo/proj/ex.js:29:9)
at param (/Users/raimo/proj/node_modules/connect/lib/connect/middleware/router.js:146:21)
at pass (/Users/raimo/proj/node_modules/connect/lib/connect/middleware/router.js:162:11)
at Object.router [as handle] (/Users/raimo/proj/node_modules/connect/lib/connect/middleware/router.js:168:7)
at next (/Users/raimo/proj/node_modules/connect/lib/connect/index.js:218:15)
at Object.handle (/Users/raimo/proj/node_modules/piler/lib/piler.coffee:449:68)
at next (/Users/raimo/proj/node_modules/connect/lib/connect/index.js:218:15)
at Object.handle (/Users/raimo/proj/node_modules/piler/lib/piler.coffee:449:68)
$ npm ls
npm WARN pile@0.2.1 package.json: bugs['web'] should probably be bugs['url']
/Users/raimo/proj
├─┬ connect@0.5.10
│ └── qs@0.4.2
├─┬ express@1.0.7
│ └── qs@0.4.2
├─┬ jade@0.22.1
│ ├── commander@0.5.2
│ └── mkdirp@0.3.0
├─┬ piler@0.3.4
│ ├── async@0.1.18
│ ├── coffee-script@1.2.0
│ ├── uglify-js@1.2.6
│ └── underscore@1.3.1
└── underscore.string@2.1.1
$ cat ex.js
var createServer = require("express").createServer;
var pile = require("piler");
var app = createServer();
var js = pile.createJSManager();
var css = pile.createCSSManager();
app.configure(function() {
js.bind(app);
css.bind(app);
css.addFile(__dirname + "/style.css");
js.addUrl("http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js");
js.addFile(__dirname + "/client/hello.js");
});
app.configure("development", function() {
js.liveUpdate(css);
});
js.addOb({ VERSION: "1.0.0" });
app.get("/", function(req, res){
res.render("index.jade", { layout: false });
});
app.listen(8080);
$ cat views/index.jade
!!!! 5
html
head
!{renderStyleTags()}
!{renderScriptTags()}
body
h1 Hello Piler
#container !{body}
goloroden commented
Same here with piler@0.3.4
Any news on this?
esamattis commented
I removed renderStyleTags
and renderScriptTags
from Piler on 0.4.0. See the updated documentation.