Add the docs, includes, badges, and layouts collections, along with a few generic defaults to your generator.
You might also be interested in generate-defaults.
Install
Install with npm:
$ npm i generate-collections --save
getting started
If you're not already familiar with [generate][], you might find generate's getting started guide useful before continuining.
Usage
Extend your generator with features and settings from generate-collections:
var readme = ; module { readme; // do generator stuff};
That's it! you should now be able to use any features from generate-collections as if they were created in your own generator.
Advanced usage
Lazily-extend your generator with features and settings from generate-collections.
This approach offers the advantage of choosing when and where to invoke generate-collections inside your own generator, through the use of tasks.
module { app; // do generator stuff // you must run the `readme task before you use // any of the features from generate-collections app};
API
If a collection does already exist on the instance, its options will be updated with any options defined on your application instance, or options passed directly to the load function. In your generator:
Params
app
{Object}: instance of generator, verb or assemble.
Example
app;
task
Exposes the collections
task function directly, so you can register the task with any name that makes sense for your project.
Params
app
{Object}returns
{Function}: Returns the task callback
Example
var collections = ;app;
.invoke
Exposes the generator on the invoke
property, allowing you to load the collections wherever and whenever it makes sense.
Params
app
{Object}options
{Object}
Example
var collections = ; // in your generatorcollections;
Compatibility
This generator works with:
- [generate][]
- verb
- update (soon)
- assemble (soon)
Related projects
- assemble: Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… more | homepage
- generate: Fast, composable, highly extendable project generator with a user-friendly and expressive API. | homepage
- verb: Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… more | homepage
Generate docs
Generate readme and API documentation with verb:
$ npm i -d && npm run docs
Or, if verb is installed globally:
$ verb
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Jon Schlinkert
License
Copyright © 2016 Jon Schlinkert Released under the MIT license.
This file was generated by verb, v0.9.0, on February 14, 2016.