Notify President Madagascar
Wondering what’s next for npm?Check out our public roadmap! »

generate-collections

0.3.8 • Public • Published

generate-collections NPM version NPM downloads Build Status

Add the docs, includes, badges, and layouts collections, along with a few generic defaults to your generator.

You might also be interested in generate-file.

Install

Install as a devDependency with npm:

$ npm install --save-dev generate-collections

Usage

Use as a plugin, to initialize commonly used view collections (no views are actually added to the collections).

module.exports = function(app) {
  app.use(require('generate-collections'));
  // do other generator stuff
};

Collections created

Adds the following view collections to your generator:

Renderable

Templates for files intended to be written to the file system.

  • files

Example usage

app.files('templates/*.md');

Layouts

Templates to be used as layouts (for "wrapping" other templates or content):

  • layouts
app.layouts('templates/layouts/*.md');

Partials

Templates to be used as partials (for injecting into other templates)

  • includes
  • badges
  • docs
app.partials('templates/partials/*.md');

Smart plugin

This generator follows base "smart plugin" conventions, so it can be used as a plugin with any of the following libraries:

  • generate: in your local generator.js file or globally installed generate generator.
  • assemble: in your local assemblefile.js file or globally installed assemble generator.
  • update: in your local updatefile.js file or globally installed update generator.
  • verb: in your local verbfile.js file or globally installed verb generator.

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)

To generate the readme and API documentation with verb:

$ npm install -g verb verb-generate-readme && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb-generate-readme, v0.1.29, on August 09, 2016.

Install

npm i [email protected]

Version

0.3.8

License

MIT

Last publish

Collaborators

  • avatar