0.3.1 • Published 8 years ago

magical-move v0.3.1

Weekly downloads
10
License
MIT
Repository
github
Last release
8 years ago

magical-move NPM version NPM downloads Build Status

mv with data replacement.

If you wanna copy and parse content, use mem-fs-editor instead.

Install

$ npm install --save magical-move

Usage

const move = require('magical-move')

/** source.js, in nunjucks template syntax:
hello {{ name }}
*/
async function main() {
	await move('./source.js', './output.js', {name: 'egoist'})
}
/** output.js:
hello egoist
*/

CLI

Install

$ npm install -g magical-move

Usage

# same result as above
$ move source.js output.js --name egoist

API

move(from, to, data, nunjucksOptions)

from String source file

to String output file

data Object The data to render template

nunjucksOptions https://mozilla.github.io/nunjucks/api.html#configure

move.sync

Same options but synchronously.

License

MIT © EGOIST

0.3.1

8 years ago

0.3.0

8 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago