Package detail

doxdox-parser-jsdoc

docsbydoxdox180MIT4.0.0-preview.25

JSDoc parser for doxdox

doxdox, documentation, jsdoc

readme

⚠️ Notice: This repository is undergoing a massive rewrite. Things will be missing, broken, or incomplete as development continues.

doxdox

Tests NPM version NPM downloads per month doxdox documentation Join the chat at https://discord.gg/nNtFsfd

Documentation, simple.

doxdox is a simple to use documentation generator that takes JSDoc comment blocks and generates different documentation formats; Markdown, Bootstrap, GitHub Wiki, and other custom plugins.

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

Example

In

/**
 * Request content from URL or array of URLs.
 *
 * @example fetch('http://www.google.com/humans.txt').then(content => console.log(content));
 * @example fetch(['http://www.google.com/humans.txt']).then(contents => console.log(content[0]));
 * @param {String|String[]} urls A URL or an array of URL strings.
 * @param {Object} [options] Options object.
 * @param {String} [options.cacheDirectory] Directory to store cache. Default is `temp/cache/`.
 * @param {Object} [options.requestOptions] Custom request options object. Default is `{}`.
 * @param {Number} [options.ttl] TTL (Time to live) in seconds. Default is 1800
 * @return {Promise<String[]>} Contents of request as an array.
 * @public
 */

Out

Install

Globally

$ npm install doxdox-cli@v4.0.0-preview.25 -g

Locally

$ npm install doxdox-cli@v4.0.0-preview.25 --save-dev

Usage

CLI

$ doxdox '**/*.js'

Custom Meta Information

Name
$ doxdox '**/*.js' --name "doxdox-next"
Description
$ doxdox '**/*.js' --description "Preview release of the doxdox package"

Ignore

Files can be ignored via the command line.

$ doxdox '**/*.js' --ignore tests/**/*.js
$ doxdox '**/*.js' --ignore **/*.test.js

They can also be ignored via a .doxdoxignore file. This file is similar in format to .gitignore and .npmignore.

tests/**/*.js
**/*.test.js

Output

File
$ doxdox '**/*.js' --output docs.md
Stdout
$ doxdox '**/*.js' > docs.md

Renderers

Markdown

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

$ doxdox '**/*.js' --renderer markdown --output docs.md
Bootstrap

For more information on Bootstrap visit https://getbootstrap.com.

$ doxdox '**/*.js' --renderer bootstrap --output docs.html

JSON

$ doxdox '**/*.js' --renderer json --output docs.json

Help

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

Options:

 -h, --help             Display this help message.
 -v, --version          Display the current installed version.
 -n, --name             Sets name of project.
 -d, --description      Sets description of project.
 -i, --ignore           Comma separated list of paths to ignore.
 -l, --parser           Parser used to parse the source files with. Defaults to jsdoc.
 -r, --renderer         Renderer to generate the documentation with. Defaults to Markdown.
 -o, --output           File to save documentation to. Defaults to stdout.
 -p, --package          Sets location of package.json file.

Included Layouts:

 - Markdown (default)    (https://daringfireball.net/projects/markdown)
 - Bootstrap             (https://getbootstrap.com)
 - JSON

NPM Run Scripts

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

$ npm install doxdox-cli@v4.0.0-preview.25 --save-dev
{
  "devDependencies": {
    "doxdox": "4.0.0-preview.14"
  },
  "scripts": {
    "docs": "doxdox 'lib/**/*.js' --renderer markdown --output DOCUMENTATION.md"
  }
}
$ npm run docs

JavaScript

Note: To use doxdox in this way you must add "type": "module" to your package.json file.

import doxdox from 'doxdox';

import parser from 'doxdox-parser-jsdoc';

import renderer from 'doxdox-renderer-markdown';

doxdox(
  process.cwd(),
  ['lib/index.js', 'lib/loaders.js', 'lib/utils.js'],
  parser,
  renderer,
  {
    name: 'doxdox-example',
    description: 'Description of doxdox example.'
  }
).then(output => {
  process.stdout.write(output);
});

Next.js

Note: To use doxdox in this way you must add "type": "module" to your package.json file.

import type { NextPage } from 'next';

import doxdox from 'doxdox';

import parser from 'doxdox-parser-jsdoc';

import renderer from 'doxdox-renderer-bootstrap';

export const getServerSideProps = async () => {
  const docs = await doxdox(
    process.cwd(),
    ['lib/index.js', 'lib/loaders.js', 'lib/utils.js'],
    parser,
    renderer,
    {
      name: 'doxdox-example',
      description: 'Description of doxdox example.'
    }
  );

  return { props: { docs } };
};

const Docs: NextPage<{
  docs: string;
}> = ({ docs }) => {
  return <div dangerouslySetInnerHTML={{ __html: docs }}></div>;
};

export default Docs;

Custom Renderer

Note: To use doxdox in this way you must add "type": "module" to your package.json file.

export default async doc => JSON.stringify(doc);
doxdox -r renderer.js

Plugins

Parsers

Default Parsers

The following parsers are bundled with doxdox.

Name Description Version
doxdox-parser-jsdoc JSDoc parser for doxdox. NPM version

A template for creating your own parser doxdox-parser-template.

Optional Parsers

The following parsers are not bundled with doxdox and must be installed separately.

Name Description Version
doxdox-parser-dox dox parser for doxdox. NPM version

Renderers

Default Renderers

The following renderers are bundled with doxdox.

Name Description Version
doxdox-renderer-bootstrap Bootstrap renderer for doxdox. NPM version
doxdox-renderer-json JSON renderer for doxdox. NPM version
doxdox-renderer-markdown Markdown renderer for doxdox. NPM version

A template for creating your own renderer doxdox-renderer-template.

Optional Renderers

The following renderers are not bundled with doxdox and must be installed separately.

Name Description Version
doxdox-renderer-dash Dash renderer for doxdox. NPM version
doxdox-renderer-github-wiki GitHub Wiki renderer for doxdox. NPM version
doxdox-renderer-pdf PDF renderer for doxdox. NPM version

Questions

If you have any questions regarding the use of doxdox, please use either GitHub Discussions 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

changelog

Changelog

v4.0.0-preview.25 - (2025-05-19)

Full Changelog

  • [hotfix] Updated packages. #231
  • [hotfix] Updated packages. #230
  • [hotfix] Updated packages. #229

v4.0.0-preview.24 - (2024-09-02)

Full Changelog

  • [hotfix] Updated packages. #228
  • [hotfix] Updated packages. #227

v4.0.0-preview.23 - (2024-04-13)

Full Changelog

  • [hotfix] Simplify pdf renderer. #225
  • [hotfix] Updated bootstrap and highlight.js link tags. #224

v4.0.0-preview.22 - (2024-04-13)

Full Changelog

  • [hotfix] Updated packages. #223
  • [hotfix] Added node namespace to node packages. #222
  • [hotfix] Fixed issue resolving global packages on windows. #221

v4.0.0-preview.21 - (2024-04-13)

Full Changelog

  • [hotfix] Check both local and global node_modules for packages. #220
  • [feat] Changed min node version to the current LTS 20.x #219
  • [hotfix] Updated bootstrap and hightlight.js libraries. #218
  • [feat] Replaced html-pdf package with custom logic. #217
  • [hotfix] Updated packages. #216

v4.0.0-preview.20 - (2023-11-15)

Full Changelog

  • [hotfix] Updated packages. #215

v4.0.0-preview.19 - (2022-10-15)

Full Changelog

  • [hotfix] Fixed parsing that failed due to comment/code pattern matching. #213
  • [feat] Normalize package json before extracting data. #212
  • [hotfix] Updated packages. #211
  • [hotfix] Added api scope tag support. #210

v4.0.0-preview.18 - (2022-10-13)

Full Changelog

  • [hotfix] Updated packages. #209
  • [hotfix] Add prototype support custom parser #207

v4.0.0-preview.17 - (2022-10-09)

Full Changelog

  • [hotfix] Prevent matching jsdoc syntax in the middle of a line. #206
  • [feat] Switched to using super-regex for matching. #205
  • [hotfix] Updated packages. #204
  • [hotfix] Updated packages. #203
  • [hotfix] Updated template package parser method to match other parsers. #202
  • [hotfix] Updated packages. #201
  • [hotfix] Switched test to use jest snapshots rather than hand written results. #200
  • [hotfix] Move pattern match util to core #199

v4.0.0-preview.16 - (2022-09-19)

Full Changelog

  • [feat] Added new custom jsdoc template. #198
  • [hotfix] Updated packages. #197
  • [hotfix] Updated packages. #196

v4.0.0-preview.15 - (2022-09-12)

Full Changelog

  • [hotfix] Update dox dependency (#195) #195
  • Updated packages. (#194) #194
  • [hotfix] Cleaned up return data from dox parser. (#192) #192
  • [hotfix] Switched to using snapshots in dox parser package. #193
  • [hotfix] Added type to method interface. #191
  • [hotfix] Updated dev packages. #190
  • [hotfix] Swapped out update-notifier for simple-update-notifier. #189
  • [hotfix] Encode HTML tags in renderers. #188
  • [hotfix] Update renderer template dependencies. #187

v4.0.0-preview.14 - (2022-09-02)

Full Changelog

  • [hotfix] Updated packages #186
  • [hotfix] Updated packages. #182
  • [hotfix] Updated packages. #181
  • [hotfix] Added jest typescript path resolver. #180
  • [feat] Added parseString method to parser template. #179
  • [feat] Load plugin from directory. #178
  • [hotfix] Updated packages. #177
  • [hotfix] Updated markdown-it package. #176
  • Fix findParentNodeModules failing on paths with non-URI legal chars #171
  • [hotfix] Replaced sanitizePath with fileURLToPath in JSDoc parser. #175
  • [hotfix] Fixed issue with doxdoxignore from macOS on Windows. #174
  • [hotfix] Updated packages. #173
  • [hotfix] Added cross-env to test targets. #172
  • [hotfix] Updated packages. #170
  • [hotfix] Updated packages. #169

v4.0.0-preview.13 - (2022-03-28)

Full Changelog

  • [feat] Added renderer config flags and package. #168
  • [hotfix] Updated packages. #167
  • [hotfix] Updated packages. #166

v4.0.0-preview.12 - (2022-03-24)

Full Changelog

  • [feat] Added new "old" parser dox. #162
  • [hotfix] Updated packages. #165
  • [hotfix] Render types with markdown renderer. #164
  • [hotfix] Added Method type to parser method. #163
  • [hotfix] Updated packages. #161

v4.0.0-preview.11 - (2022-03-13)

Full Changelog

  • [hotfix] Update renderer template dependencies #160
  • [hotfix] Set default value for name and description to null. #159
  • [hotfix] Updated packages. #158
  • [hotfix] Updated packages. #157

v4.0.0-preview.10 - (2022-03-03)

Full Changelog

  • [hotfix] Removed cacheDir from parseString method. #156
  • [hotfix] Updated packages. #155

v4.0.0-preview.9 - (2022-02-27)

Full Changelog

  • [hotfix] Lint when testing via GitHub Action. #154
  • [hotfix] Added rimraf and copyfiles packages. #153
  • [feat] Added eslint config and npm test target. #152
  • [hotfix] Swapped out sqlite3 for better-sqlite3. #150
  • [feat] Added a parseString method for parsing strings. #148
  • [hotfix] Updated packages. #147

v4.0.0-preview.8 - (2022-02-21)

Full Changelog

  • [hotfix] Prevent issue when initial filter value is null. #146

v4.0.0-preview.7 - (2022-02-21)

Full Changelog

  • [feat] Added filter methods functionality to bootstrap renderer. #145
  • [feat] Added meta property to Jsdoc interface. #144
  • [hotfix] Updated packages. #143
  • [hotfix] Changed zoom level of generated PDF. #142
  • [hotfix] Prevent error when return type is missing. #141

v4.0.0-preview.6 - (2022-02-20)

Full Changelog

  • [hotfix] Bootstrap styles #140
  • [hotfix] Fixed issue where all methods would be marked as private. #139
  • [hotfix] Added support for api private tag in Jsdoc. #138
  • [hotfix] Added color to package name link. #137

v4.0.0-preview.5 - (2022-02-19)

Full Changelog

  • [feat] Linked project title if homepage is defined in pkg. #136
  • [hotfix] Updated packages. #135
  • [feat] Added new flag for swapping out the parser. #134

v4.0.0-preview.4 - (2022-02-08)

Full Changelog

  • [hotfix] Added missing scope to methods #133
  • [hotfix] Forced code highlighting to javascript in pdf renderer. #132
  • [hotfix] Updated packages. #131
  • [hotfix] Forced code highlighting to javascript in dash renderer. #130
  • [hotfix] Forced code highlighting to javascript. #129
  • [hotfix] Fix casting issue #128
  • [hotfix] Switched to using jest expect for tests. #127

v4.0.0-preview.3 - (2022-02-07)

Full Changelog

  • [hotfix] Updated parse-cmd-args package. #125
  • [hotfix] Updated packages. #123
  • [hotfix] Allow multiple inputs. #124
  • [hotfix] Added snapshot tests. #122
  • [hotfix] Hide empty parameters and returns sections. #121
  • [hotfix] Set default value for description properties. #120
  • [hotfix] Updated packages. #119
  • [hotfix] Filter undocumented methods from parser. #118
  • [hotfix] Sort methods names before sending to renderer. #117
  • [hotfix] Removed margin from file list. #116
  • [hotfix] Updated packages. #115
  • Added ignoreFiles and gitignore option to globby. #114
  • [hotfix] Make directory before rendering output. #113

v4.0.0-preview.2 - (2022-01-31)

Full Changelog

  • [feat] Added new pdf plugin. #112
  • [feat] Windows support #107
  • [hotfix] Updated packages. #111
  • [feat] Publish tool #109
  • [hotfix] Added more utility tests #108

v4.0.0-preview.1 - (2022-01-25)

Full Changelog

  • [feat] Rewrote doxdox with TypeScript in npm workspaces. #100

v3.0.0 - (2019-02-27)

Full Changelog

  • fix(package): update chalk to version 2.3.0 #58
  • Update update-notifier to the latest version 🚀 #54
  • Update codecov to the latest version 🚀 #56
  • chore(package): update mocha to version 4.0.1 #57
  • fix(package): update chalk to version 2.3.0 #55
  • chore(package): update mocha to version 4.0.1 #53
  • Update chalk to the latest version 🚀 #51

v2.0.3 - (2017-05-30)

Full Changelog

  • Update @neogeek/eslint-config-standards to the latest version 🚀 #38
  • Update eslint to the latest version 🚀 #36
  • Update codecov to the latest version 🚀 #37
  • Update codecov to the latest version 🚀 #35
  • Update codecov to the latest version 🚀 #34
  • Update @neogeek/eslint-config-standards to the latest version 🚀 #32
  • chore(package): update eslint to version 3.17.1 #33
  • chore(package): update eslint to version 3.17.1 #31
  • chore(package): update eslint to version 3.16.1 #30
  • Update @neogeek/eslint-config-standards to the latest version 🚀 #29
  • chore(package): update eslint to version 3.16.1 #28
  • Update update-notifier to the latest version 🚀 #27
  • Add Greenkeeper badge 🌴 #26

v2.0.2 - (2017-02-15)

Full Changelog

  • No merges found

v2.0.1 - (2016-12-15)

Full Changelog

  • No merges found

v2.0.0 - (2016-12-08)

Full Changelog

  • Update update-notifier to version 1.0.3 🚀 #22
  • doxdox-plugin-markdown@1.0.3 breaks build 🚨 #21
  • Update mocha to version 3.2.0 🚀 #18

v1.1.3 - (2016-11-07)

Full Changelog

  • No merges found

v1.1.2 - (2016-11-04)

Full Changelog

  • Update globby to version 6.1.0 🚀 #14
  • Update all dependencies 🌴 #13

v1.1.1 - (2016-10-28)

Full Changelog

  • No merges found

v1.1.0 - (2016-10-25)

Full Changelog

  • No merges found

v1.0.1 - (2016-10-24)

Full Changelog

  • No merges found

v1.0.0 - (2016-10-24)

Full Changelog

v0.1.15 - (2016-08-21)

Full Changelog

  • No merges found

v0.1.14 - (2016-05-15)

Full Changelog

  • No merges found

v0.1.13 - (2016-05-04)

Full Changelog

  • No merges found

v0.1.12 - (2016-04-03)

Full Changelog

  • No merges found

v0.1.11 - (2016-03-25)

Full Changelog

  • No merges found

v0.1.10 - (2015-11-13)

Full Changelog

  • No merges found

v0.1.9 - (2015-11-02)

Full Changelog

  • No merges found

v0.1.8 - (2015-08-03)

Full Changelog

  • No merges found

v0.1.7 - (2015-05-31)

Full Changelog

  • No merges found

v0.1.6 - (2015-04-12)

Full Changelog

  • No merges found

v0.1.5 - (2015-04-05)

Full Changelog

  • No merges found

v0.1.4 - (2015-02-19)

Full Changelog

  • No merges found

v0.1.3 - (2015-01-26)

Full Changelog

  • No merges found

v0.1.2 - (2015-01-13)

Full Changelog

  • Suggested Dash docset changes #6

v0.1.1 - (2015-01-01)

Full Changelog

  • No merges found

v0.1.0 - (2014-12-24)

Full Changelog

  • No merges found

v0.0.18 - (2014-12-12)

Full Changelog

  • No merges found

v0.0.17 - (2014-12-07)

Full Changelog

  • No merges found

v0.0.16 - (2014-12-06)

Full Changelog

  • No merges found

v0.0.15 - (2014-12-05)

Full Changelog

  • No merges found

v0.0.14 - (2014-12-05)

Full Changelog

  • No merges found

v0.0.13 - (2014-10-16)

Full Changelog

  • No merges found

v0.0.12 - (2014-10-02)

Full Changelog

  • Added text overflow to methods (fixes #3). #3

v0.0.11 - (2014-09-11)

Full Changelog

  • No merges found

v0.0.10 - (2014-09-08)

Full Changelog

  • No merges found

v0.0.9 - (2014-09-06)

Full Changelog

  • No merges found

v0.0.8 - (2014-09-05)

Full Changelog

  • No merges found

v0.0.7 - (2014-08-18)

Full Changelog

  • No merges found

v0.0.6 - (2014-08-17)

Full Changelog

  • No merges found

v0.0.5 - (2014-08-17)

Full Changelog

  • No merges found

v0.0.4 - (2014-08-10)

Full Changelog

  • No merges found

v0.0.3 - (2014-08-10)

Full Changelog

  • No merges found

v0.0.2 - (2014-08-07)

Full Changelog

  • No merges found

v0.0.1 - (2014-08-03)

  • Initial release! 🎉

This changelog was generated with generate-local-changelog