Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dirtydocs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dirtydocs

Quick and dirty single page docs from JSDoc doclets

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Dirty Docs

Quick and dirty single page docs from JSDoc doclets.

Warning: Very simplistic, only currently handles classes, may not work for you!

Why

  • I wanted to include the API docs for a very simple JS project directly within the README file.
  • The source already had JSDoc style comments and I didn't want to manually duplicate them in the README.

How

Once installed a dirtydocs executable should be found in node_modules/.bin which accepts JSDoc doclet JSON on stdin and the path to a nunjucks template file as it's first argument. The JSON is transformed to make it more suitable for use within the template before the template is rendered and the results output to stdout.

Install

npm install dirtydocs

NOTE: JSDoc will be installed as a peer dependency.

Usage

Assuming you have installed locally, to run the example:

node_modules/.bin/jsdoc --explain node_modules/dirtydocs/examples/code.js | node_modules/.bin/dirtydocs node_modules/dirtydocs/examples/README.md

To run against your own source using the example template:

node_modules/.bin/jsdoc --explain path/to/source.js | node_modules/.bin/dirtydocs node_modules/dirtydocs/examples/README.md

When designing your own template you can view the object that will be passed to the template as JSON by omitting the template argument:

node_modules/.bin/jsdoc --explain path/to/source.js | node_modules/.bin/dirtydocs

License

MIT (c) Matt Walker

FAQs

Package last updated on 09 Feb 2015

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