Apply the configuration data to the file contents(treat it as the template). It can specify a template engine. The default template engine will be apply if no specified.
Usage
Task = require 'task-registry'require 'task-registry-file-template' template = Task 'template' ###hi.md:the file path is '#{path}'.#{hi}###templateexecuteSync path: 'hi.md'engine: 'Lodash'hi: 'hello world.'###the file path is 'hi.md'.hello world.###
API
executeSync(aFile)
orexecute(aFile, done)
:- the
aFile
should be a json object or the File object.path
String: the file pathengine
String|Object: the [template engine][task-registry-template-engine]
- the
TODO
License
MIT