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
yarn install does what is expected, i.e. install:sub-project being executed.
When there are no scripts matching install:** an error is thrown: ERROR: Task not found: "install:**".
I tried a number of extglob patterns expecting that minimatch (assuming extglob is enabled) would support those. No luck.
E.g. "postinstall": "run-p install:*(**)" results in
$ run-p install:*(**)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `run-p install:*(**)'
error Command failed with exit code 2.
Why do I need this?
install:** would install sub-projects dependencies in a monorepo. And I'd like to setup a monorepo boilerplate having no sub-projects mounted yet so that maintainers could add their sub-projects with the least hassle possible.
A possible workaround is just to add "install:void": ":", script (effectively explicit no-op shell command). Doesn't look really elegant though.
Will appreciate any suggestions on this.
The text was updated successfully, but these errors were encountered:
Just sharing my findings below hoping it might be of any use to you.
My expectation was that since npm-run-all uses minimatch under the hood and minimatch mentions support for extglob the problem could be solved by means of extglob patterns. Seems like this is not the case and minimatch supports only a subset of extglob. However it would be really nice to enjoy 0 or more pattern.
ESLint team decided to add an option to suppress the error when no files matching the pattern found and there is recent pending PR to resolve the issue. Adding an explicit option to suppress the error (or to fire a warning instead) might also be helpful.
When
package.json
contains the scripts as followsyarn install
does what is expected, i.e.install:sub-project
being executed.When there are no scripts matching
install:**
an error is thrown:ERROR: Task not found: "install:**"
.I tried a number of
extglob
patterns expecting thatminimatch
(assuming extglob is enabled) would support those. No luck.E.g.
"postinstall": "run-p install:*(**)"
results inWhy do I need this?
install:**
would install sub-projects dependencies in a monorepo. And I'd like to setup a monorepo boilerplate having no sub-projects mounted yet so that maintainers could add their sub-projects with the least hassle possible.A possible workaround is just to add
"install:void": ":",
script (effectively explicitno-op
shell command). Doesn't look really elegant though.Will appreciate any suggestions on this.
The text was updated successfully, but these errors were encountered: