|
1 | 1 | import chalk from 'chalk';
|
2 |
| -import { addDependency, addDevDependency, installDependencies as installDeps } from 'nypm'; |
| 2 | +import { installDependencies as installDeps } from 'nypm'; |
3 | 3 |
|
4 |
| -import { type PackageManager } from './pm'; |
5 | 4 | import { spinner } from './spinner';
|
6 | 5 |
|
7 |
| -const installAllDeps = async (projectDir: string, packageManager: PackageManager) => { |
8 |
| - await installDeps({ cwd: projectDir, silent: true, packageManager }); |
9 |
| - await addDependency('@bigcommerce/catalyst-client', { |
10 |
| - cwd: projectDir, |
11 |
| - silent: true, |
12 |
| - packageManager, |
13 |
| - }); |
14 |
| - await addDevDependency('@bigcommerce/eslint-config-catalyst', { |
15 |
| - cwd: projectDir, |
16 |
| - silent: true, |
17 |
| - packageManager, |
18 |
| - }); |
| 6 | +const installAllDeps = async (projectDir: string) => { |
| 7 | + await installDeps({ cwd: projectDir, silent: true, packageManager: 'pnpm' }); |
19 | 8 | };
|
20 | 9 |
|
21 |
| -export const installDependencies = async (projectDir: string, packageManager: PackageManager) => |
22 |
| - spinner(installAllDeps(projectDir, packageManager), { |
| 10 | +export const installDependencies = async (projectDir: string) => |
| 11 | + spinner(installAllDeps(projectDir), { |
23 | 12 | text: `Installing dependencies. This could take a minute...`,
|
24 | 13 | successText: `Dependencies installed successfully`,
|
25 | 14 | failText: (err) => chalk.red(`Failed to install dependencies: ${err.message}`),
|
|
0 commit comments