0.0.6 • Published 6 years ago
referenza v0.0.6
referenza
Create static HTML project documentation using Markdown
Usage
Installation
Using npm:
npm i referenza
To use on the command line, it's best to install globally:
npm i -g referenza
Any local installation of referenza can also be used on the command line using npx
:
npx referenza <command> [command options...]
Modes
referenza has two modes:
- compile: Compile Markdown sources to HTML documentation files.
- serve: Start a HTTP server to serve compiled HTML documentation.
CLI
compile
Common usage:
referenza compile -s "$(realpath src)" -o "$(realpath dist)" -S "$(realpath state.json)" -p ProjectA ProjectB ProjectC
For the full usage guide, use the help option:
referenza compile -h
serve
Common usage:
referenza serve -o "$(realpath dist)" -p 3072
For the full usage guide, use the help option:
referenza serve -h
API
referenza exposes two functions provided via an object as its export, compile
and serve
.
TypeScript type declarations are bundled with the module.
referenza.compile
const referenza = require("referenza");
referenza.compile({
clean: false,
sourceDir,
intermediateDir,
outputDir,
statePath,
metadataFileName: "__metadata__.js",
logo: "",
feedbackUrl,
projectNames,
urlPathPrefix: "/",
})
.catch(err => {
throw err;
});
referenza.serve
const referenza = require("referenza");
referenza.compile({
port: 3072,
outputDir,
urlPathPrefix: "/",
});