Closed jpgorman closed 6 years ago
Just to be a little clearer, I'm running the following as part of an npm script
./node_modules/.bin/flow-copy-source -v --ignore **/__tests__/**,**/__regression__/** src lib
Which gets translated to the following call to Glob
new Glob( '**/*.js', { ignore: "'**/__tests__/**','**/__regression__/**'", <----- currently always a string }, );
However, what you'd really want is:
new Glob( '**/*.js', { ignore: ['**/__tests__/**','**/__regression__/**'], <----- array }, );
Sorry for not taking a look at this much sooner!
It turns out that you can already pass the --ignore
option multiple times in order to specify multiple ignore patterns. I've added a bit to the readme pointing this out now.
Currently the --ignore param pipes a string straight into the ignore node of the options object. This works well where you want to ignore a single path. However as the ignore property accepts an array for multiple paths, there is no way to pass multiple ignore paths in via the --ignore option.
I've noticed that the babel-cli does allow this behavior via a comma delimited list. It would be great if this behavior was allow in this library as well.