Skip to content

Commit

Permalink
moved semver to dev and added twing 4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
noel-schenk committed Nov 1, 2019
1 parent 032cce1 commit fb5be3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1780,9 +1780,12 @@ exports.twing.render = function(str, options, cb) {
return promisify(cb, function(cb) {
var engine = requires.twing || (requires.twing = require('twing'));
try {
var rendTmpl = new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).render(options);
var tmpl = cache(options) || cache(options, rendTmpl);
cb(null, tmpl);
new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).then((twingTemplate) => {
twingTemplate.render(options).then((rendTmpl) => {
var tmpl = cache(options) || cache(options, rendTmpl);
cb(null, tmpl);
});
});
} catch (err) {
cb(err);
}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"test": "mocha"
},
"dependencies": {
"bluebird": "^3.1.1",
"semver": "^6.3.0"
"bluebird": "^3.1.1"
},
"devDependencies": {
"arc-templates": "^0.5.1",
Expand Down Expand Up @@ -69,6 +68,7 @@
"razor-tmpl": "^1.3.1",
"react": "^15.6.2",
"react-dom": "^15.3.2",
"semver": "^6.3.0",
"should": "*",
"slm": "^0.5.0",
"squirrelly": "^5.0.1",
Expand All @@ -79,7 +79,7 @@
"tinyliquid": "^0.2.30",
"toffee": "^0.1.12",
"twig": "^0.10.0",
"twing": ">=2.3.5",
"twing": "^4.0.0",
"underscore": "^1.3.3",
"vash": "^0.12.2",
"velocityjs": "^0.8.2",
Expand Down

0 comments on commit fb5be3f

Please sign in to comment.