polydox

0.1.0 • Public • Published

Coveralls – test coverage Travis – build status David – status of dependencies Stability: unstable Code style: airbnb

polydox

Pipe multiple files into dox at once.





Why

The original dox CLI tool reads a single source from stdin:

$ dox < utils.js
...JSON...

This simple idea gets complicated in a multi-file project. Here are your options:

  • Concat files before piping them to dox:
$ cat source/*.js | dox
...LINE NUMBERS LOST...
  • Concat dox output:
for file in source/*.js; do dox $file; done
...NOT VALID JSON...
  • Wild hacks.

But worry no more! Now you have polydox:

$ polydox source/*.js
[
  {
    // …usual dox output PLUS:
    "sourceFile""source/a.js"
  },
  {
    // …usual dox output PLUS:
    "sourceFile""source/b.js"
  },
]

Installation

$ npm install --global polydox

Usage

SYNOPSIS

Usage: polydox [options] <file>...

OPTIONS

-h  --help   Print a short synopsis (-h) or this usage info (--help)
-r  --raw    Don’t preprocess stuff with markdown

EXAMPLES

$ polydox a.js

$ polydox a.js b.js c.js > dox-output.json

$ polydox source/*.js | doxie --render --inject into Readme.md

License

MIT © Studio B12 GmbH

Readme

Keywords

Package Sidebar

Install

npm i polydox

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • tomekwi