consolidate-jstransformer
Consolidate-compatible API to use JSTransformers.
API
Replace the consolidate
package with consolidate-jstransformer
.
Before
var cons =
After
var cons =
Usage
Use consolidate-jstransformer
the same way you would use Consolidate:
var cons = ;cons;
Or without options / local variables:
var cons = ;cons;
To dynamically pass the engine, simply use the subscript operator and a variable:
var cons = name = 'swig'; consname'views/page.html' user: 'tobi' { if err throw err; console;};
Render strings rather than files:
var cons = name = 'swig'; consname;
Promises
If no callback function is provided, a Promise will be returned.
var cons = ; cons ;
License
MIT