-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
corepack project install
command?
#505
Comments
Worth noting that /cc @arcanis |
This would be really nice. I think I would take it a step further so I could also run Maybe something like
|
I like that. Maybe So:
|
corepack install --project
command?corepack project install
command?
Opened a PR! #551 |
Currently, there's no standardized way to install dependencies for projects using different package managers without prior knowledge of the specific manager used. This can complicate CI/CD pipelines, development scripts, and workflows for developers working across multiple projects.
It would be nice to be able to write a script that will do
npm install
/pnpm install
/yarn install
on arbitrary packages, without having to know in advance what theirpackageManager
field says.Proposal - a
--project
parameter added to theinstall
command:This would change
install
to install the project/node_modules rather than the package manager itself. (Or could be a separate command or something).For a project with
"packageManager": "[email protected]"
thecorepack install --project
command would be equivalent to running(called via a subshell)
Or for a project with
"packageManager": "[email protected]"
this would be equivalent toSimilar for yarn, etc.
Benefits
Other notes:
packageManager
is present, of usingnpm
, or looking for lockfiles, or just erroring--
likecorepack install --project -- --no-frozend-lockfile
(though this would no longer really be generic across package managers I guess)corepack add left-pad
Not sure if this has been asked before but I couldn't find it in the issues.
The text was updated successfully, but these errors were encountered: