Skip to content

Commit

Permalink
refactor: packageManager logic for perf improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Nov 7, 2020
1 parent c885f6d commit e827f4f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions bin/webpack.js
Expand Up @@ -82,8 +82,19 @@ 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"));
const isNpm = fs.existsSync(path.resolve(process.cwd(), "package-lock.json"));

let isYarn = false;

if (!isNpm) {
isYarn = fs.existsSync(path.resolve(process.cwd(), "yarn.lock"));
}

let isPnpm = false;

if (!isYarn) {
isPnpm = fs.existsSync(path.resolve(process.cwd(), "pnpm-lock.yaml"));
}

let packageManager;

Expand Down

0 comments on commit e827f4f

Please sign in to comment.