Skip to content

Commit

Permalink
Merge branch 'db-murphy-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
doowb committed Sep 18, 2017
2 parents fa24a0a + b961c1e commit 734fbc1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,28 @@ function fromStringRenderer(name) {
};
}

/**
* velocity support.
*/

exports.velocityjs = fromStringRenderer('velocityjs');

/**
* velocity string support.
*/

exports.velocityjs.render = function(str, options, fn){
return promisify(fn, function(fn) {
var engine = requires.velocityjs || (requires.velocityjs = require('velocityjs'));
try {
options.locals = options;
fn(null, engine.render(str, options).trimLeft());
} catch (err) {
fn(err);
}
});
};

/**
* Liquid support.
*/
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"vash": "^0.12.2",
"walrus": "^0.10.1",
"whiskers": "^0.4.0"
"velocityjs": "^0.8.2"
},
"keywords": [
"engine",
Expand Down

0 comments on commit 734fbc1

Please sign in to comment.