Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 2.1 KB

custom-boilerplates.md

File metadata and controls

65 lines (44 loc) · 2.1 KB

Custom boilerplates

Use bower.json to manage your own custom boilerplates or templates for Verb

We might put it on the roadmap to natively allow custom boilerplates. If this is something you'd like to see supported natively, please submit a feature request or a pull request.

However, in the meantime a simple alternative is to use Bower to manage your custom docs. Here is a suggested workflow to get you started:

1. Create the boilerplate

Create a new project that has the docs you want to use on other projects, and add a bower.json file with something like the following:

{
  "name": "verb-boilerplate-foo",
  "version": "0.1.0",
  "main": [
    "templates/README.tmpl.md",
    "templates/about.md",
    "templates/options.md",
    "templates/examples.md",
    "templates/authors.md"
  ]
}

See Bower.io for suggestions on customizing this file.

Oh, and don't forget to actually add the documention/templates to the directories specified in bower.json!

2. Register the package with Bower

You'll want to visit Bower's documentation to learn how to register new packages. Also note that before registering your package it must be in a repository on GitHub where Bower can find it!

3. Using your custom boilerplate

Once your package has been created and registered with Bower, add a .bowerrc file and a bower.json file to the root of any project that will be using your new boilerplate.

In .bowerrc add the following:

{
  "directory": "docs"
}

In bower.json add the following (customize to the needs of your project):

{
  "name": "your-project-name",
  "version": "0.1.0",
  "dependencies": {
    "verb-boilerplate-foo": "~0.1.0"
  }
}

4. Install your custom boilerplate

If everything is setup properly, running bower istall at the command line should install your boilerplate in the ./docs directory of your project!

Suggestions or pull requests for improving this workflow or the project in general or welcome!