yo-profile
Dynamic profile parser for Yeoman generators
Enable Yeoman generators to use static rc-type files for pre-populating (or overriding entirely) optional settings during project setup.
Install
$ npm install --save yo-profile
Generator Usage
Once installed, add an include for the project in your generator's base index file:
var profile = new default ;
Then, create an object, specifying default (empty) fields and a file path somewhere in your generator's init
method. You can use chaining to immediately access the parsed properties:
var Generator = yeomangeneratorsBase
The above snippet will attempt to load .mysettingsrc
from your home directory or the directory of the project being created.
CLI Usage
When invoking a yo-profile-powered generator, specify the desired profile with the --profile
flag. For example:
yo generator:subgenerator --profile Boss
If no profile is specified, yo-profile will attempt to load the profile specified as the default.
RC File Structure
By default, you should be using an INI file structure for your rc profile.
; The default profile will be used
License
MIT © Eric Mann