Skip to content

Commit b609664

Browse files
author
Anand Thakker
committed
Add another note about command modules
1 parent 0022934 commit b609664

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: lib/commands/build.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ function build(documentation, parsedArgs, callback) {
5151
hljs: options.hljs || {}
5252
};
5353

54-
var generator = documentation.bind(null,
55-
inputs, options, onDocumented);
54+
var generator = documentation.bind(null, inputs, options, onDocumented);
5655

5756
function onDocumented(err, comments) {
5857
if (err) {

Diff for: lib/commands/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/*
22
* Maps command name to a command plugin module. Each command plugin module
3-
* should export a function that takes (documentation, parsedArgs), where
3+
* must export a function that takes (documentation, parsedArgs), where
44
* documentation is just the main module (index.js), and parsedArgs is
55
* { inputs, options, command, commandOptions }
6+
*
7+
* Command modules should also export a `description`, which will be used in
8+
* the main CLI help, and optionally a `parseArgs(yargs, parentArgv)` function
9+
* to parse additional arguments.
610
*/
711

812
module.exports = {

0 commit comments

Comments
 (0)