diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-04-08 19:56:21 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-04-08 19:56:21 -0400 |
| commit | fe1ea91f73059c146369ccb2404fcaf6d03d2f4d (patch) | |
| tree | 9b8c5e37821e147048e5d1ddbe5435af47716949 /app/node_modules/oktemplate | |
| parent | 0c6d7edc0042464c8f05d38e6933186719dd259e (diff) | |
| parent | 32f87fcb58466e0e311349f96751c18e2a2cd7ea (diff) | |
k
Diffstat (limited to 'app/node_modules/oktemplate')
| -rw-r--r-- | app/node_modules/oktemplate/index.js | 7 | ||||
| -rw-r--r-- | app/node_modules/oktemplate/package.json | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/node_modules/oktemplate/index.js b/app/node_modules/oktemplate/index.js index 700020c..dafe5e6 100644 --- a/app/node_modules/oktemplate/index.js +++ b/app/node_modules/oktemplate/index.js @@ -1,3 +1,4 @@ +var Q = require('q'); var fs = require('fs'); var path = require('path'); var glob = require('glob'); @@ -56,8 +57,12 @@ OKTemplateRepo.prototype._populateCache = function _populateCache(engine, cache, name: name, templateString: templateString, render: function(data) { + return Q.promise(function(resolve, reject) { // TODO Not sure if this caches parsed templates behind the scenes? - return engine.parseAndRender(templateString, data); + engine.parseAndRender(templateString, data) + .then(resolve) + .catch(reject); + }); } } }); diff --git a/app/node_modules/oktemplate/package.json b/app/node_modules/oktemplate/package.json index 3e92ccb..70e94e3 100644 --- a/app/node_modules/oktemplate/package.json +++ b/app/node_modules/oktemplate/package.json @@ -12,6 +12,7 @@ "bluebird": "^2.9.21", "glob": "^5.0.3", "json-to-html": "^0.1.2", - "liquid-node": "^2.5.0" + "liquid-node": "^2.5.0", + "q": "^1.2.0" } } |
