cover all

This commit is contained in:
harttle
2017-08-15 23:52:05 +08:00
parent 6d59f34fc8
commit 030037eedc
14 changed files with 286 additions and 246 deletions
+1 -4
View File
@@ -43,7 +43,6 @@ var _engine = {
return this.renderer.renderTemplates(tpl, scope)
},
parseAndRender: function (html, ctx, opts) {
console.log('parse and render')
return Promise.resolve()
.then(() => this.parse(html))
.then(tpl => this.render(tpl, ctx, opts))
@@ -69,9 +68,7 @@ var _engine = {
var paths = root.map(root => path.resolve(root, filepath))
return anySeries(paths, path => statFileAsync(path).then(() => path))
.catch((e) => {
if (e.code === 'ENOENT') {
e.message = `Failed to lookup ${filepath} in: ${root}`
}
e.message = `${e.code}: Failed to lookup ${filepath} in: ${root}`
throw e
})
},