mirror of https://github.com/webpack/webpack.git
feat: add pnpm support for installing CLI
This commit is contained in:
parent
7415a61846
commit
c885f6d7dc
|
@ -83,8 +83,18 @@ if (!cli.installed) {
|
||||||
console.error(notify);
|
console.error(notify);
|
||||||
|
|
||||||
const isYarn = fs.existsSync(path.resolve(process.cwd(), "yarn.lock"));
|
const isYarn = fs.existsSync(path.resolve(process.cwd(), "yarn.lock"));
|
||||||
|
const isPnpm = fs.existsSync(path.resolve(process.cwd(), "pnpm-lock.yaml"));
|
||||||
|
|
||||||
|
let packageManager;
|
||||||
|
|
||||||
|
if (isYarn) {
|
||||||
|
packageManager = "yarn";
|
||||||
|
} else if (isPnpm) {
|
||||||
|
packageManager = "pnpm";
|
||||||
|
} else {
|
||||||
|
packageManager = "npm";
|
||||||
|
}
|
||||||
|
|
||||||
const packageManager = isYarn ? "yarn" : "npm";
|
|
||||||
const installOptions = [isYarn ? "add" : "install", "-D"];
|
const installOptions = [isYarn ? "add" : "install", "-D"];
|
||||||
|
|
||||||
console.error(
|
console.error(
|
||||||
|
|
|
@ -221,7 +221,8 @@
|
||||||
"opencollective",
|
"opencollective",
|
||||||
"dependabot",
|
"dependabot",
|
||||||
"browserslist",
|
"browserslist",
|
||||||
"samsunginternet"
|
"samsunginternet",
|
||||||
|
"pnpm"
|
||||||
],
|
],
|
||||||
"ignoreRegExpList": ["/Author.+/", "/data:.*/", "/\"mappings\":\".+\"/"],
|
"ignoreRegExpList": ["/Author.+/", "/data:.*/", "/\"mappings\":\".+\"/"],
|
||||||
"ignorePaths": ["**/dist/**", "examples/**/README.md"]
|
"ignorePaths": ["**/dist/**", "examples/**/README.md"]
|
||||||
|
|
Loading…
Reference in New Issue