A reusable project generator that copies file recursively, while replacing keywords from passed data.
var generify =source = './template'dest = '/tmp/generify-test'data = hello: 'hello world'
This will replace all the
__hello__ patterns found in all files
'hello world' string.
If a file begins with
__ that will be automatically converted into a
.. This is useful for generating
.gitignore files, as on NPM a
.gitignore file will be automatically converted into a
generify also offers an executable that can be called with:
Usage: generify template destination [json file]
Where the json file contains the data to be replaced.
This project was kindly sponsored by nearForm.