Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

b12-archive/polydox

Repository files navigation

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 one property:
    "sourceFile": "source/a.js"
  },
  {
    // …
    "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 --raw a.js b.js c.js > dox-output.json

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

License

MIT © Studio B12 GmbH

About

Pipe multiple files into dox at once.

Resources

License

Stars

Watchers

Forks

Packages

No packages published