add getTemplateForString

This commit is contained in:
2017-05-26 15:16:33 +02:00
parent 2246f101ba
commit f917820545
3 changed files with 18 additions and 1 deletions

View File

@@ -7,3 +7,10 @@ export let getTemplateForFile = async (filePathArg: string) => {
let filePathAbsolute = plugins.path.resolve(filePathArg)
return plugins.handlebars.compile(plugins.smartfile.fs.toStringSync(filePathAbsolute))
}
/**
* get a template for string
*/
export let getTemplateForString = async (fileStringArg: string) => {
return plugins.handlebars.compile(fileStringArg)
}