Are cli options working?
See original GitHub issueI’m using react-docgen by cli. However, --ignore
, --exclude
and --resolver
seem not working at all. It keeps parsing those unwanted files and output No suitable component definition found
, which is really annoying since they’re not meant to be generated docs.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
What is a command-line interface (CLI)? - TechTarget
CLIs accept as input commands that are entered by keyboard; the commands invoked at the command prompt are then run by the computer....
Read more >Command-Line Options - Catb.org
In the original Unix tradition, command-line options are single letters preceded by a single ... List files to be extracted from an archive...
Read more >Why Knowing the Command Line Important?
The Command Line Interface or CLI is a text interface that is navigated by typing commands at prompts, instead of using the mouse...
Read more >Command-line interface - Wikipedia
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of...
Read more >Understanding Command Line Arguments and How to Use ...
Command line arguments are extra commands you can use when launching a program so that the program's functionality will change.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The documentation for the exclude option says “Filename pattern to exclude” - I’m reading that to mean that it will match a pattern and exclude those files. But I can’t find a way to specify a pattern that works.
I can explicitly exclude files by specifying the full file name, but cannot exclude files by pattern. For example, I’m trying:
And getting a whole bunch of “No suitable component definition found” errors.
I’ve tried a number of different ways of specifying that pattern:
EDIT
A little more digging reveals that the problem is with the
node-dir
package. In short, this package always assumes you want to build an array of “excludes” and passes that tonode-dir
. However,node-dir
either accepts a regular expression or an array of strings, but not both.Ideally, I think the fix should be with
node-dir
- it should probably be a little more “open minded” about the list of exclusions it receives and be able to handle an array of regular expressions and strings.Well, we have to parse the file in order to know whether it defines components or not. However, maybe we should create a friendlier output that simply lists in which files it didn’t find component definitions (and provide a CLI option to suppress that information).