Skip to content

Commit

Permalink
Merge pull request #81 from ForbesLindesay/patch-1
Browse files Browse the repository at this point in the history
Add `then-jade` as an alternative `jade` implementation
  • Loading branch information
tj committed Jan 5, 2013
2 parents 384c596 + dd41dac commit ee2234e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,14 @@ function fromStringRenderer(name) {
*/

exports.jade = function(path, options, fn){
var engine = requires.jade || (requires.jade = require('jade'));
var engine = requires.jade;
if (!engine) {
try {
engine = requires.jade = require('jade');
} catch (err) {
engine = requires.jade = require('then-jade');
}
}
engine.renderFile(path, options, fn);
};

Expand Down

0 comments on commit ee2234e

Please sign in to comment.