package
JavaScript API documentor with simple syntax.
npm install ndocGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
NDoc is an inline comment parser and JavaScript documentation generator written in Node.JS. This project was inspired by PDoc. It tries to keep compatibility, but has some differences:
deprecated tag: you can set versions, when tag was
deprecated and when method/property will be removed.read-only, internal, chainableWe suppose that you already have Node and npm installed.
If not - try nvm.
npm install -g ndocusage: ndoc [-h] [-v] [--exclude PATTERN] [-o PATH] [--use PLUGIN]
[--alias MAPPING] [-r RENDERER] [--link-format FORMAT]
[-t TEMPLATE] [--show-all] [--package PACKAGE] [--index FILE]
[--gh-ribbon URL] [--broken-links ACTION] [--noenv]
PATH[PATH ...]
Positional arguments:
PATH Source files location
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
--exclude PATTERN Glob patterns of filenames to exclude (you
can use wildcards: ?, *, **).
-o PATH, --output PATH Resulting file(s) location.
--use PLUGIN Load custom plugin.
--alias MAPPING Registers extensions alias. For example
`cc:js` will register `cc` extension as an
alias of `js`
-r RENDERER, --render RENDERER Documentation renderer (html, json). More
can be added by custom plugins.
--link-format FORMAT View sources link (no links by default)
format. You can use `{file}` and `{line}`
and any of `{package.*}` variables for
interpolation.
-t TEMPLATE, --title TEMPLATE Documentation title template. You can use
NDoc Syntax. It is similar to PDoc one, with some extensions (see start of this doc for details).
You can generate prototype documentation for test:
make testThen open ./tests/prototype-doc/index.html.
You can create and use your own parser/renderer via --use option. Get one of
the parsers or renderers as a base template, copy it
into separate folder. Create package.json and modify it to fit your needs. Then
attach it with --use my-module argument.
You can use NDoc as module, for example, to override default options processing.
var NDoc = require('ndoc');
var options = {
linkFormat : 'http://example.com/{file}#{line}',
output: : 'doc'
};
var ast;
try {
ast = NDoc.parse(['lib/my-module.js'], options);
} catch (err) {
console.error(err);
process.exit(1);
}
try {
NDoc.render('html', ast, options);
} catch (err) {
console.error
This project is distributed under MIT license.
Estimated unpacked size across 55 packages.
21.7 MB
Includes dependencies.
^14.0.0
15.0.3
^11.9.0
11.12.0