eightshift-libs
eightshift-libs copied to clipboard
Try to resolve Boilerplate and npm dependencies automatically
Describe your feature request
I'd like to add an argument to wp boilerplate init [...]
and wp boilerplate [...] use-[...]
commands to resolve dependencies (Boilerplate and npm alike) automatically, if possible.
E.g. when you run wp boilerplate blocks use-block --name='carousel' --resolveDependencies=true
, that the command recognizes Swiper as a dependency (already the case) and installs it using npm install swiper
.
This will probably not be possible in some cases, where PHP exec
calls are blocked, so an argument is our best bet.
Describe the solution you'd like
- A new argument for resolving dependencies
- If set to true, when dependencies are recognized:
-
- a function checks whether they are installed
-
- if not, it tries to install them using
npm install
orwp boilerplate
- if not, it tries to install them using
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in this repo.
Yes
Please confirm that you have searched in our documentation and couldn't find the answer.
Yes