verb-tag-jscomments
Tag for Verb. Uses js-comments to parse JavaScript code comments and generate API documentation.
Last updated 6 years ago by jonschlinkert .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install verb-tag-jscomments 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.2.2                                ...           latest (6 years ago)

7 Versions

  • 0.2.2                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 14
This Week 36
This Month 66
Last Day 7
Last Week 30
Last Month 167
Dependencies (3)
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |