Skip to content

Commit fb5be3f

Browse files
committed
moved semver to dev and added twing 4 support
1 parent 032cce1 commit fb5be3f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

lib/consolidate.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,9 +1780,12 @@ exports.twing.render = function(str, options, cb) {
17801780
return promisify(cb, function(cb) {
17811781
var engine = requires.twing || (requires.twing = require('twing'));
17821782
try {
1783-
var rendTmpl = new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).render(options);
1784-
var tmpl = cache(options) || cache(options, rendTmpl);
1785-
cb(null, tmpl);
1783+
new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).then((twingTemplate) => {
1784+
twingTemplate.render(options).then((rendTmpl) => {
1785+
var tmpl = cache(options) || cache(options, rendTmpl);
1786+
cb(null, tmpl);
1787+
});
1788+
});
17861789
} catch (err) {
17871790
cb(err);
17881791
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
"test": "mocha"
2424
},
2525
"dependencies": {
26-
"bluebird": "^3.1.1",
27-
"semver": "^6.3.0"
26+
"bluebird": "^3.1.1"
2827
},
2928
"devDependencies": {
3029
"arc-templates": "^0.5.1",
@@ -69,6 +68,7 @@
6968
"razor-tmpl": "^1.3.1",
7069
"react": "^15.6.2",
7170
"react-dom": "^15.3.2",
71+
"semver": "^6.3.0",
7272
"should": "*",
7373
"slm": "^0.5.0",
7474
"squirrelly": "^5.0.1",
@@ -79,7 +79,7 @@
7979
"tinyliquid": "^0.2.30",
8080
"toffee": "^0.1.12",
8181
"twig": "^0.10.0",
82-
"twing": ">=2.3.5",
82+
"twing": "^4.0.0",
8383
"underscore": "^1.3.3",
8484
"vash": "^0.12.2",
8585
"velocityjs": "^0.8.2",

0 commit comments

Comments
 (0)