0.1.0 • Published 10 years ago
magical-mv v0.1.0
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
0.1.0
10 years ago