dot-ify
make dot templates 'requireable' when using browserify
- name the exported function as the file being required
- exports an object that contains a render method which is the compiled template
Install
npm i --save dot-ify
Usage
In code
var b = ; var dotify = ; // regular way to include itb;// make it globalb;
or in the package.json
file
"browserify" : "transforms": "dot-ify"
Then in your code
var tpl = var content = tpl;