verb-tag-jscomments

0.2.2 • Public • Published

verb-tag-jscomments NPM version

Tag for Verb. Uses js-comments to parse JavaScript code comments and generate API documentation.

Visit the js-comments repo for documentation.

Install

Install with npm:

npm i verb-tag-jscomments --save-dev

Usage

If you're using 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:

Example:

---
tags: ['verb-tag-jscomments']
---

In your templates, you can now use the tag like this:

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

(Also note that front-matter is just one way to register verb tags, filters, and plugins. See the verb documentation for more info.)

Filtering

The easiest way to filter the output is to use Coffee front matter.

---coffee
tags: ['verb-tag-jscomments']

# extend the function onto the context
fn:
  filter = (comment) -> console.log(comment)
---

{%= jscomments("index.js", {fn: filter}) %}

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on August 25, 2014.

Readme

Keywords

Package Sidebar

Install

npm i verb-tag-jscomments

Weekly Downloads

22

Version

0.2.2

License

none

Last publish

Collaborators

  • jonschlinkert