Docma


npm release license downloads dependencies maintained

© 2017, Onur Yıldırım (@onury). MIT License.

A powerful tool to easily generate beautiful HTML documentation from Javascript (JSDoc), Markdown and HTML files.

Like this one you're reading now...

Features

Installation

npm i docma -g

Building Documentation with CLI

You can use Docma CLI to build documentations directly from your console. Once you create the configuration (JSON) file, it's quite simple.

docma -c path/to/docma.config.json

You can even serve the docs locally and test.

docma serve path/to/docs

See

Building Documentation with API

If you need to build documentation from within your code, use the API.

const Docma = require('docma');

Either by passing a configuration object.

const config = {
    src: [
        './code/**/*.js',
        './README.md'
    ],
    dest: './output/doc'
};
Docma.create()
    .build(config)
    .catch(error => {
        console.log(error);
    });

Or by reading configuration from a JSON file.

Docma.create()
    .build('./path/to/docma.config.json')
    .catch(error => {
        console.log(error);
    });

Parsed Output

To investigate the parsed JSDoc output, enable the debug option that will create a JSON output(s) within the root of the destination directory. If you have a problem with the parsed documentation data, open an issue @ jsdoc-x. (I'm the author.)

For markdown output issues (that are not related with style), you can open an issue @ marked.

Change-log

See CHANGELOG. Note: If you're upgrading from Docma v1.x to v2.x, there are some breaking changes.

License

MIT. You don't have to include any copyright notice in your documentation output or templates but I'd appreciate if you let people know about this tool so we can read better documentations.

Emoji shortcuts used in source markdown files are parsed into twemoji. Graphics licensed under CC-BY 4.0.