-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Support custom packageManager other than npm/yarn/pnpm. #4483
Comments
happy to send a PR |
It would also be nice to be able to configure per-project package manager via vue.config.js. For example, you usually use yarn everywhere, but sometimes you support projects where npm is used. And you don't want to delete yarn.lock and reinstall node_modules to avoid side-effects because of the different folders structure |
@zyy7259 how would you tackle the possibly different commands that some custom package manager might have? These would have to be mapped somehow, i.e. what command is the qeuivalent of "npm install"? |
@Alex-Sokolov in v4 we've refactored the package manager related stuff and it now infers the project manager from project lockfiles vue-cli/packages/@vue/cli/lib/util/ProjectPackageManager.js Lines 70 to 76 in 91024a7
|
If the subcommands are identical to npm, just use command-line alias (like, If not, it will surely increase our maintenance burden. We are not going to support custom package managers without a clear plan of future maintenance. |
alias won't work with execa sindresorhus/execa#100 |
Okay… |
Not necessary.
The problem of custom package manager is not how to specify it, but how to map the subcommands: vue-cli/packages/@vue/cli/lib/util/ProjectPackageManager.js Lines 33 to 52 in a42f838
So if we want to support such a feature, we need to turn this error into a warning and then use the vue-cli/packages/@vue/cli/lib/util/ProjectPackageManager.js Lines 78 to 81 in a42f838
|
How about this #4621 |
Closes #4483 * feat: support custom package manager * feat: refine warning msg for unknown package manager * feat: refine blank lines * feat: refine warning msg for unknown package manager * feat: refine warning msg for unknown package manager
What problem does this feature solve?
Currently the --packageManager only supports npm/yarn/pnpm.
This feature will let the end user specify a custom node package manager.
The company I worked at uses a private packageManager. Right now I cannot find a way to use it with vue-cli to create my project.
What does the proposed API look like?
--packageManager xxx
The text was updated successfully, but these errors were encountered: