initialize-engine
Code generation engine. Inspired by the work in mattdesl/quick-stub.
Installation
$ npm install initialize-engine
Usage
const initializeEngine = const mkdirp = const path = // create specified path// (obj, fn) -> null { const loc = path }
API
initializeEngine(opts, argv)
Run the engine with the given opts, and an optional settings object to extend. Opts are run in sequence. The following opts are available:
- pre: an array of functions that can execucute arbitrary code. Use it to prompt for user input, create repositories, query data and more.
- files: files to be written. Dotfiles need to be prepended with a
_
. Files are populated with variables using the{{varName}}
syntax. - devDependencies: npm dev dependencies to be installed.