New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ndoc

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndoc

JavaScript API documentor with simple syntax.

  • 1.0.7
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NDoc - JavaScript documentation generator

Build Status

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:

  • NDoc is a CLI tool, not library. It doesn't require additional programming to execute.
  • Clarified EBNF syntax. Definitions now MUST be separated with an empty line from the following comments.
  • Added options for deprecated tag: you can set versions, when tag was deprecated and when it will be removed.
  • Added new tags: read-only, internal, chainable
  • Events support.

How to Install

We suppose that you already have node.js and npm installed. If not - try nvm. Then install NDoc globally

npm install -g ndoc

Usage

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

Syntax

NDoc Syntax. It is similar to PDoc one, with some extentions (see start of this doc for details).

For developers

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.

License

This project is distributed under MIT license.

Keywords

FAQs

Package last updated on 09 Feb 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc