Remove devDependency flag from astro add
(#4666)
* remove dev dependency flag * remove redundant space if no flags
This commit is contained in:
parent
919df13b91
commit
fcb9a05c31
1 changed files with 4 additions and 4 deletions
|
@ -551,11 +551,11 @@ async function getInstallIntegrationsCommand({
|
||||||
|
|
||||||
switch (pm.name) {
|
switch (pm.name) {
|
||||||
case 'npm':
|
case 'npm':
|
||||||
return { pm: 'npm', command: 'install', flags: ['--save-dev'], dependencies };
|
return { pm: 'npm', command: 'install', flags: [], dependencies };
|
||||||
case 'yarn':
|
case 'yarn':
|
||||||
return { pm: 'yarn', command: 'add', flags: ['--dev'], dependencies };
|
return { pm: 'yarn', command: 'add', flags: [], dependencies };
|
||||||
case 'pnpm':
|
case 'pnpm':
|
||||||
return { pm: 'pnpm', command: 'install', flags: ['--save-dev'], dependencies };
|
return { pm: 'pnpm', command: 'install', flags: [], dependencies };
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -579,7 +579,7 @@ async function tryToInstallIntegrations({
|
||||||
} else {
|
} else {
|
||||||
const coloredOutput = `${bold(installCommand.pm)} ${
|
const coloredOutput = `${bold(installCommand.pm)} ${
|
||||||
installCommand.command
|
installCommand.command
|
||||||
} ${installCommand.flags.join(' ')} ${cyan(installCommand.dependencies.join(' '))}`;
|
}${['', ...installCommand.flags].join(' ')} ${cyan(installCommand.dependencies.join(' '))}`;
|
||||||
const message = `\n${boxen(coloredOutput, {
|
const message = `\n${boxen(coloredOutput, {
|
||||||
margin: 0.5,
|
margin: 0.5,
|
||||||
padding: 0.5,
|
padding: 0.5,
|
||||||
|
|
Loading…
Reference in a new issue