Home

Awesome

verb NPM version Build Status

Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.

Built by verb

The follow projects use verb to build the reamde and other docs:

Quickstart

Install verb and verb-cli globally:

$ npm i verb verb-cli -g

Next, just add a .verb.md markdown template to your project and run verb in the commandline (NOTE that verb will overwrite the existing README, so make sure your work is committed!).

I'm working on a site for verb, but in the meantime a good place to see .verb.md examples is to surf my projects.

Install

Install with npm

$ npm i verb --save-dev

Usage

var verb = require('verb');

Table of contents

<!-- toc -->

(Table of contents generated by [verb])

<!-- tocstop -->

Features

CLI

(WIP)

API

Verb's API is organized into the following categories:

Template API

(WIP)

Methods:

Verb exposes entire API from template. See the [template docs] the full API.

Config API

Transforms

Run immediately during init. Used to extend or modify the this object.

verb.transform('engine', function() {
  this.engine('md', require('engine-lodash'));
});

Application Settings

Set arbitrary values on verb.cache:

See the [config-cache docs] the full API.

Options

Set and get values from verb.options:

See the [option-cache docs] the full API.

(WIP)

Data API

Set and get values from verb.cache.data

Verb exposes entire API from plasma. See the [plasma docs] the full API.

(WIP)

Middleware API

Verb exposes the entire [en-route] API. See the [en-route docs] the full API.

(WIP)

Task API

.task

Define a Verb task.

Params

Example

verb.task('docs', function() {
  verb.src(['.verb.md', 'docs/*.md'])
    .pipe(verb.dest('./'));
});

.watch

Re-run the specified task(s) when a file changes.

Params

Example

verb.task('watch', function() {
  verb.watch('docs/*.md', ['docs']);
});

.src

Glob patterns or filepaths to source files.

Params

Example

verb.src('src/*.hbs', {layout: 'default'})

.dest

Specify a destination for processed files.

Params

Example

verb.dest('dist')

.copy

Copy a glob of files to the specified dest.

Params

Example

verb.task('assets', function() {
  verb.copy('assets/**', 'dist');
});

.diff

Display a visual representation of the difference between two objects or strings.

Params

Example

var doc = verb.views.docs['foo.md'];
verb.render(doc, function(err, content) {
  verb.diff(doc.orig, content);
});

Related projects

Why use Verb?

It's magical and smells like chocolate. If that's not enough for you, it's also the most powerful and easy-to-use documentation generator for node.js. And it's magical.

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.

Troubleshooting

  1. First things first, please make sure to run npm cache clear, then do npm i verb verb-cli -g. If that doesn't clear things up, try #2.
  2. Create an issue. We'd love to help, so please be sure to provide as much detail as possible, including:

Major changes

Author

Jon Schlinkert

License

Copyright © 2014-2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on August 26, 2015.