Skip to content
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

feat: add pnpm support for installing CLI #11945

Merged
merged 3 commits into from Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion bin/webpack.js
Expand Up @@ -83,8 +83,18 @@ if (!cli.installed) {
console.error(notify);

const isYarn = fs.existsSync(path.resolve(process.cwd(), "yarn.lock"));
const isPnpm = fs.existsSync(path.resolve(process.cwd(), "pnpm-lock.yaml"));
snitin315 marked this conversation as resolved.
Show resolved Hide resolved

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"];
snitin315 marked this conversation as resolved.
Show resolved Hide resolved

console.error(
Expand Down
3 changes: 2 additions & 1 deletion cspell.json
Expand Up @@ -221,7 +221,8 @@
"opencollective",
"dependabot",
"browserslist",
"samsunginternet"
"samsunginternet",
"pnpm"
],
"ignoreRegExpList": ["/Author.+/", "/data:.*/", "/\"mappings\":\".+\"/"],
"ignorePaths": ["**/dist/**", "examples/**/README.md"]
Expand Down