yeoman-blueprints
For a working example look at generator-angular-blueprints.
Extends Yeoman's NamedBase to allow to your generator to use overridable templates. By using these extended methods yeoman will automatically check for locally created template under first ./blueprints and then ./node_modules before falling back to the global templates in the generator.
YOUR GENERATORS MUST BE UNDER generators/
npm install --save yeoman-blueprints
the generated folder structure for overriding blueprint
root
|-- blueprints
|---- templates
|------ blueprint.json
|------ controller
└-------- template.js
Methods
blueprints.copyTpl
// 'controller' - points to generator you want to use in this case located under generators/controller/// 'js' - the file type to be created// values - an object of values to be made available to templatethis;
blueprints.copy
// 'controller' - points to generator you want to use in this case located under generators/controller/// 'js' - the file type to be createdthis;
Example:
var blueprint = ; moduleexports = blueprintsNamedBase;