magical-mv
mv with data replacement.
Last updated 5 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install magical-mv 
SYNC missed versions from official npm registry.

magical-mv NPM version NPM downloads Build Status

mv with data replacement.

Install

$ npm install --save magical-mv

Usage

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

Current Tags

  • 0.1.0                                ...           latest (5 years ago)

1 Versions

  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |