feat: add pnpm support for installing CLI

This commit is contained in:
Nitin Kumar 2020-11-07 08:28:32 +05:30
parent 7415a61846
commit c885f6d7dc
2 changed files with 13 additions and 2 deletions

View File

@ -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"));
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"];
console.error(

View File

@ -221,7 +221,8 @@
"opencollective",
"dependabot",
"browserslist",
"samsunginternet"
"samsunginternet",
"pnpm"
],
"ignoreRegExpList": ["/Author.+/", "/data:.*/", "/\"mappings\":\".+\"/"],
"ignorePaths": ["**/dist/**", "examples/**/README.md"]