npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

doxbox

v1.0.0

Published

JSDoc to Markdown, Bootstrap, and custom Handlebars template documentation generator.

Downloads

10

Readme

doxdox

JSDoc to Markdown, Bootstrap, and custom Handlebars template documentation generator.

Build Status AppVeyor branch codecov Dependency Status Known Vulnerabilities bitHound Overall Score NPM Version Greenkeeper badge Latest Documentation

doxdox is a simple to use documentation generator that takes JSDoc comment blocks and generates different documentation formats; Markdown, Bootstrap, and custom Handlebars templates.

doxdox also features support for extendability via custom plugins for both parsing and generating documentation.

In

/**
 * Parse array of directory globs and/or files, and then render the parsed data through the defined layout plugin.
 *
 *     parseInputs(['src/*.js'], {'ignore': [], 'parser': 'dox', 'layout': 'markdown'}).then(content => {});
 *
 * @param {Array} inputs Array of directory globs and/or files.
 * @param {Object} config Configuration object.
 * @param {String} config.ignore Array of paths to ignore.
 * @param {String} config.parser String representing the parser to be used.
 * @param {String} config.layout String representing the layout plugin to be used.
 * @return {Object} Promise
 * @public
 */

Out

screenshot

Bootstrap template plugin, included with doxdox https://github.com/neogeek/doxdox-plugin-bootstrap

Getting Started

The following instructions assume you have already setup JSDoc comment blocks in your codebase. If you have not and would like to learn more about how to use JSDoc, visit http://usejsdoc.org/.

First install doxdox globally with NPM.

$ npm install doxdox -g

Then, once you have doxdox installed globally (or local to your project, see below), you can start generating documentation. For this example, we will be generating a Markdown file and storing it within the project.

With a directory structure similar to the example shown below, run the following command to generate a Markdown file and output the generated contents to a new file named DOCUMENTATION.md.

$ doxdox 'lib/**/*.js' --layout markdown --output DOCUMENTATION.md
├─ bin/
├─ coverage/
├─ lib/
│   ├─ doxdox.js
│   ├─ loaders.js
│   └─ utils.js
├─ node_modules/
└─ test/
     ├─ fixtures/
     └─ specs/
          ├─ doxdox.js
          ├─ loaders.js
          └─ utils.js

Installation

doxdox can be installed via either NPM or Yarn.

$ npm install doxdox -g
$ yarn global add doxdox

Usage

CLI

Layouts

Markdown

For more information on Markdown visit http://daringfireball.net/projects/markdown/.

$ doxdox 'lib/**/*.js' --layout markdown --output DOCUMENTATION.md

Bootstrap

Form more information on Bootstrap visit https://v4-alpha.getbootstrap.com/.

$ doxdox 'lib/**/*.js' --layout bootstrap --output docs/index.html

Custom Handlebars Template

For more information on writing Handlebars templates visit http://handlebarsjs.com/.

$ doxdox 'lib/**/*.js' --layout templates/README.hbs --output README.md

Ignore

The ignore flag allows you to ignore both directories (with glob syntax) and files. Comma separated values.

$ doxdox './**/*.js' --ignore './coverage/**/*.js'

See https://github.com/isaacs/minimatch#usage for more information on how to use globs.

Help

Usage: doxdox <path> ... [options]

Options:

 -h, --help             Display this help message.
 -v, --version          Display the current installed version.
 -d, --description      Sets description.
 -i, --ignore           Comma separated list of paths to ignore.
 -l, --layout           Template to render the documentation with.
 -o, --output           File to save documentation to. Defaults to stdout.
 -p, --package          Sets location of package.json file.
 -t, --title            Sets title.

Included Layouts:

 - Markdown (default)    (http://daringfireball.net/projects/markdown/)
 - Bootstrap             (http://getbootstrap.com/)
 - Handlebars            (http://handlebarsjs.com/)

NPM Run Scripts

For more information on NPM run scripts visit https://docs.npmjs.com/cli/run-script.

$ npm install doxdox --save-dev
{
  "devDependencies": {
    "doxdox": "2.0.1"
  },
  "scripts": {
    "docs": "doxdox 'lib/**/*.js' --layout markdown --output DOCUMENTATION.md"
  }
}
$ npm run docs

Via JavaScript

const doxdox = require('doxdox');

parseInputs(['lib/**/*.js'], {
    'parser': 'dox',
    'layout': 'markdown'
}).then(content => {

    process.stdout.write(content);

});

See documentation for more information on parseInputs.

Packages

Core Packages

All core packages come pre-installed with doxdox.

| Package | Version | Dependencies | Documentation | | ------- | ------- | ------------ | ------------- | | doxdox-parser-dox | NPM Version | dependencies Status | Latest Documentation | | doxdox-plugin-bootstrap | NPM Version | dependencies Status | Latest Documentation | | doxdox-plugin-handlebars | NPM Version | dependencies Status | Latest Documentation | | doxdox-plugin-markdown | NPM Version | dependencies Status | Latest Documentation |

Other Packages

Non-core packages must be installed separately from doxdox.

$ npm install doxdox doxdox-plugin-dash --save-dev

The, via the --layout flag, you specify the plugin name minus doxdox-plugin-.

| Package | Version | Dependencies | Documentation | | ------- | ------- | ------------ | ------------- | | doxdox-plugin-dash | NPM Version | dependencies Status | Latest Documentation | | doxdox-plugin-github-wiki | NPM Version | dependencies Status | Latest Documentation | | grunt-doxdox | NPM Version | dependencies Status | |

Questions

If you have any questions regarding the use of doxdox, please use either the Gitter chat room or Stack Overflow. The issue tracker is to be used for bug reports and feature requests only.

Contributing

Be sure to review the Contributing Guidelines before logging an issue or making a pull request.

License

MIT