-
Notifications
You must be signed in to change notification settings - Fork 98
Jade support for jade.compile() in addition to jade.render() #72
Comments
Not at the moment, though it's not impossible.
It can't unfortunately, we'd have to add that. Right now you can get away with returning JS for As an aside, what does |
|
Hm, I'm not sure that will work, because node.js's module framework expects that require.extensions returns some kind of string - if you return an already instantiated |
Paul, thanks for the feedback. Durran is correct, jade.compile returns a JS function which, when invoked, renders within a context. It's described here: http://jade-lang.com/api/ We are presently working around this by invoking jade.compile directly as needed, but this implies that we'll also ship Jade plus its dependencies in our release build. I'd like to solve this in due time. |
@kangas I think we can make this work but it'll be ugly, we can take the |
The current Jade compiler always calls jade.render to produce
text/html
.I want to enhance the compiler so it is also able to return
application/javascript
(via jade.compile) when a javascript file callsrequire('file.jade')
.Any suggestions on how to approach this?
Questions:
The text was updated successfully, but these errors were encountered: