From 30e11c03ecc27ed1c906704d25610f456203fa5d Mon Sep 17 00:00:00 2001 From: Alberto Torres Date: Thu, 16 Nov 2017 13:57:48 +0100 Subject: [PATCH] Improve "API usage" section. --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a766a5b..c853930 100644 --- a/README.md +++ b/README.md @@ -631,7 +631,21 @@ codoCLI.generate "path/to/base/dir", options, (exitCode) -> process.exit exitCod `option` is an object with options as above. Please note that they are *not* CamelCase (e.g. `min-coverage` instead of `minCoverage`). Furthermore only global defaults will be used, project defaults are ignored - if Codo is used via API. + if Codo is used via API. Source files and extra files are lists called `inputs` and `extras` respectively. + An equivalent to the `.codoopts` file above would be: + +```coffeescript +options = + name: 'Codo' + readme: 'README.md' + title: 'Codo Documentation' + private: true + quiet: true + extension: 'coffee' + output: './doc' + inputs: ['./src'] + extras: ['LICENSE', 'CHANGELOG.md'] +``` ## Keyboard navigation