add __compile helper

This commit is contained in:
2017-03-25 20:23:47 +01:00
parent fef292d81f
commit 69ff80cc2b
6 changed files with 18 additions and 9 deletions
+4 -1
View File
@@ -1,4 +1,7 @@
import * as plugins from './smarthbs.plugins'
export let registerHelper = plugins.handlebars.registerHelper
plugins.handlebars.registerHelper('__compile', (evaluationString, evaluationContext) => {
let template = plugins.handlebars.compile(evaluationString)
return template(evaluationContext)
})