Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #81 from ForbesLindesay/patch-1

Add `then-jade` as an alternative `jade` implementation
  • Loading branch information...
commit ee2234e04bf7fc3d9282596f926c8e23a3211bab 2 parents 384c596 + dd41dac
@tj authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/consolidate.js
View
9 lib/consolidate.js
@@ -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);
};
Please sign in to comment.
Something went wrong with that request. Please try again.