Skip to content

Latest commit

 

History

History
202 lines (128 loc) · 3.89 KB

.verb.md

File metadata and controls

202 lines (128 loc) · 3.89 KB

{%= name %} {%= badge("fury") %} {%= badge("travis") %}

{%= description %}

Built by verb

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

  • micromatch (1.7m downloads/mo) - this readme is pretty extensive, with a TOC and other advanced features
  • is-glob (1.6m downloads/mo) - example of simple readme
  • repeat-string (2.2m downloads/mo) - example of another basic readme.

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

{%= include("install-npm") %}

Usage

var verb = require('{%= name %}');

Table of contents

Features

{%= docs("sections/features.md") %}

CLI

(WIP)

API

Verb's API is organized into the following categories:

Template API

(WIP)

Methods:

  • .create
  • .loader
  • .load
  • .engine
  • .helper
  • .helpers
  • .asyncHelper
  • .asyncHelpers
  • .render

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:

  • .set
  • .get
  • .del

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

Options

Set and get values from verb.options:

  • .option
  • .enable
  • .enabled
  • .disable
  • .disabled
  • .disabled

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

(WIP)

Data API

Set and get values from verb.cache.data

  • .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

Define a Verb task.

Params

  • name {String}: Task name
  • fn {Function}

Example

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

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

Params

  • glob {String|Array}: Filepaths or glob patterns.
  • fn {Function}: Task(s) to watch.

Example

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

{%= apidocs("index.js") %}

Related projects

{%= related(verb.related.list, {remove: name}) %}

Why use Verb?

{%= docs("sections/why.md") %}

Running tests

{%= include("tests") %}

Contributing

{%= include("contributing") %}

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]({%= bugs.url %}). We'd love to help, so please be sure to provide as much detail as possible, including:
  • version of verb and verb-cli
  • platform
  • any error messages or other information that might be useful.

Major changes

Author

{%= include("author") %}

License

{%= copyright({start: 2014, linkify: true}) %} {%= license({linkify: true}) %}


{%= include("footer") %}

{%= reflinks(verb.reflinks.list) %}