Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
NDoc is an inline comment parser and JavaScript documentation generator written in node.js. This project is inspired by PDoc. It tries to keep compatibility, but has some differences:
deprecated
tag: you can set versions, when tag was deprecated and
when it will be removed.read-only
, internal
, chainable
We suppose that you already have node.js
and npm
installed.
If not - try nvm. Then install NDoc globally
npm install -g ndoc
ndoc [options] <path>...
path PATH Source files location
Options:
-h, --help Output usage information
-o, --output PATH Resulting file(s) location [doc]
-e, --extension STRING Source files extension [js]
-f, --format <html|js> Documentation format [html]
-i, --index PATH Index file [README.md]
-t, --title TITLE Documentation title
Supports interpolation. See notes for --link-format.
-l, --link-format FMT String format for link to source file [{file}#L{line}]
{url} is substituted with the URL of repository read from manifest file
{file} is substituted with the name of the source file
{line} is substituted with the line number within the source file
E.g. http://github.com/nodeca/ndoc/{file}#L{line}
{package.XXX} is substituted with XXX key of package.json, if any
--view-source-label TXT Text for "View source" link
--skin PATH Custom templates
-b, --broken-links ACTION What to do if broken link occured. Can be one of 'show', 'hide', 'throw'.
Default is 'hide'
NDoc uses data from package.json
in current folder, if found one. This helps to minimize number of options when building documentation for node.js projects. For example, you can just run:
ndoc ./lib
NDoc Syntax. It is similar to PDoc one, with some extentions (see start of this doc for details).
If you like to make patches or develop skins - install NDoc in developer mode:
git clone [your_fork_url]
cd ndoc
npm install --dev
After installation is done you can generate prototype documentation for test:
make test
Then open ./test/proto-doc/index.html
. Here is hosted doc example. There are also some shortcuts in Makefile,
if you make skin changes and need to constantly rebuild samples.
This project is distributed under MIT license.
FAQs
JavaScript API documentor with simple syntax.
We found that ndoc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.