magical-mv
v0.1.0
Published
mv with data replacement.
Downloads
5
Readme
magical-mv

mv with data replacement.
Install
$ npm install --save magical-mvUsage
const mv = require('magical-mv')
/** source.js:
hello {{ name }}
*/
mv('./source.js', './output.js', {name: 'egoist'})
.then(content => {
console.log('Done!')
})
/** output.js:
hello egoist
*/API
mv(from, to, [data, handlebarsOpts])
from String source file
to String output file
data Object The data to render template
handlebarsOpts Object Options for handlebars.compile
mv.sync
Same options but synchronously.
License
MIT © EGOIST
