elsen-js-comments

0.3.6 • Public • Published

js-comments NPM version

Parse JavaScript code comments and generate API documentation.

Please report any bugs or feature requests, thanks! Also, please note, custom filtering for comments is being implemented, but in the meantime only comments that have @api public will be rendered!

Install

npm

npm i js-comments --save-dev

bower

bower install js-comments --save-dev

API

jscomments

  • patterns {String}: Glob pattern or file paths to use.
  • dest {String}: Optional destination file path for generating relative links.
  • options {Object}
  • returns {String}: String of rendered markdown documentation.
var comments = require('js-comments');
var docs = comments(string);

See example output. See example code comments.

.parseFiles

  • patterns {String}: Glob pattern or file paths to use.
  • dest {String}: Optional destination file path for generating relative links.
  • options {Object}
  • returns {Array}: Returns an array of comments objects.

Expands the given glob patterns and creates a normalized comments object for each file in the array.

.render

  • context {Object}
  • options {Object}
  • returns {String}: Return the rendered string.

Render a template string with the given context. A custom lodash template may be passed on the options.

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Originally modified from scrawl.js. Copyright (c) 2014 Caolan McMahon, contributors. Released under the MIT license


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

Package Sidebar

Install

npm i elsen-js-comments

Weekly Downloads

4

Version

0.3.6

License

none

Last publish

Collaborators

  • zsheffer