Skip to content

Commit

Permalink
Updated Jade API
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Puzrin committed Jan 3, 2014
1 parent e17a301 commit 7332db1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/mincer/engines/jade_engine.js
Expand Up @@ -75,8 +75,11 @@ JadeEngine.configure = function (opts) {
// Render data
JadeEngine.prototype.evaluate = function (context, locals) {
if (this.nextProcessor && 'JstEngine' === this.nextProcessor.name) {
return Jade.compile(this.data, _.extend({}, options, {
client: true,
// Use `compileClient` for Jade v1.0.0+, and `compile` for older versions
var compile = Jade.compileClient || Jade.compile;

return compile(this.data, _.extend({}, options, {
client: true, // needed only for Jade < v1.0.0
filename: context.logicalpath
})).toString();
}
Expand Down

0 comments on commit 7332db1

Please sign in to comment.