Tag for Verb. Uses js-comments to parse JavaScript code comments and generate API documentation.
npm install verb-tag-jscomments> Tag for Verb. Uses js-comments to parse JavaScript code comments and generate API documentation.
Visit the js-comments repo for documentation.
``bash`
npm i verb-tag-jscomments --save-dev
If you're using [verb-cli][verb-cli], you will need to define ['verb-tag-jscomments'] in the tags property in the front matter of your project's .verbrc.md (or docs/README.tmpl.md). This registers the tag with [verb][verb]:
Example:
`yaml`
---
tags: ['verb-tag-jscomments']
---
In your templates, you can now use the tag like this:
`js`
{%= jscomments("index.js") %}
_(Also note that front-matter is just one way to register verb tags, filters, and plugins. See the [verb documentation][docs] for more info.)_
The easiest way to filter the output is to use Coffee front matter.
`coffee
---coffee
tags: ['verb-tag-jscomments']
{%= jscomments("index.js", {fn: filter}) %}
``
Jon Schlinkert
+ github/jonschlinkert
+ twitter/jonschlinkert
*
_This file was generated by verb-cli on August 25, 2014._
[verb]: https://github.com/assemble/verb
[docs]: https://github.com/assemble/verb/blob/master/DOCS.md#tags
[verb-cli]: https://github.com/assemble/verb-cli