From f8846d8ff3a5f7ea69ea1f7eb847d2c300244e2d Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Mon, 30 Mar 2015 17:46:32 -0400 Subject: [PATCH] Expand FAQ and USAGE --- FAQ.md | 4 ++++ USAGE.md | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 USAGE.md diff --git a/FAQ.md b/FAQ.md index c35e87a..20edd56 100644 --- a/FAQ.md +++ b/FAQ.md @@ -6,6 +6,10 @@ in JavaScript. It exposes multiple interfaces for users: * with `npm i -g documentation`, it provides a binary for command-line usage * install `documentation` with `npm` to use the node-facing interace +`documentation` runs in [node.js](https://nodejs.org/) but supports JavaScript +that runs in _any environment_: you can use it to document browser libraries, +server libraries, or even things that use RequireJS or other module systems. + ## How does `documentation` differ from JSDoc? JSDoc is both a **standard syntax for documentating code** as well as a diff --git a/USAGE.md b/USAGE.md new file mode 100644 index 0000000..2fdda77 --- /dev/null +++ b/USAGE.md @@ -0,0 +1,24 @@ +## Using `documentation` on the command line + +Install the `documentation` binary with [npm](https://www.npmjs.com/). + +```sh +$ npm install -g documentation +``` + +`documentation` then installs a command called `documentation`. Run it with +`-h` to get help. + +```sh +$ documentation -h +Usage: bin/documentation.js [options] + +Options: + -f, --format output format, of [json, md] [default: "json"] + --mdtemplate markdown template: should be a file with Handlebars syntax + -p, --private generate documentation tagged as private + -h, --help Show help + +Examples: + documentation foo.js parse documentation in a given file +```