You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 27eec18
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/advanced.md
+33-33Lines changed: 33 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,7 +252,7 @@ This example uses [jest](https://github.com/facebook/jest) as a test runner, but
252
252
.commandDir(directory, [opts])
253
253
------------------------------
254
254
255
-
_Note: `commandDir()` does not work with Deno, see [hierarchy using index.mjs](/docs/advanced.md#esm-hierarchy) for an example of building a complex nested CLI using ESM._
255
+
_Note: `commandDir()` does not work with Deno, see [hierarchy using index.mjs](/docs/advanced.md#esm-hierarchy) for an example of building a complex nested CLI using an array of modules._
256
256
257
257
Apply command modules from a directory relative to the module calling this method.
258
258
@@ -290,11 +290,12 @@ can either move your module to a different directory or use the `exclude` or
290
290
291
291
-`include`: RegExp or function
292
292
293
-
Allow list certain modules. See [`require-directory`](https://www.npmjs.com/package/require-directory) for details.
293
+
294
+
Allow list certain modules. Either a regex or callback can be provided. Return `true` from the callback to load the file.
294
295
295
296
-`exclude`: RegExp or function
296
297
297
-
Block list certain modules. See [`require-directory`](https://www.npmjs.com/package/require-directory) for details.
298
+
Block list certain modules. Either a regex or callback can be provided. Return `true` from the callback to skip the file.
298
299
299
300
### Example command hierarchy using `.commandDir()`
0 commit comments