Skip to content

Commit

Permalink
code suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed May 10, 2023
1 parent e16791e commit 0bbd08d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
6 changes: 4 additions & 2 deletions packages/create-astro/src/actions/dependencies.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Context } from './context';

import { color } from '@astrojs/cli-kit';
import { execa } from 'execa';
import { error, info, spinner, title } from '../messages.js';

Expand Down Expand Up @@ -30,7 +30,9 @@ export async function dependencies(
error('error', e);
error(
'error',
'Dependencies failed to install, please install them manually after setup.'
`Dependencies failed to install, please run ${color.bold(
ctx.pkgManager + ' install'
)} to install them manually after setup.`
);
});
},
Expand Down
10 changes: 0 additions & 10 deletions packages/create-astro/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ export const info = async (prefix: string, text: string) => {
log(`${' '.repeat(5)} ${color.cyan('◼')} ${color.cyan(prefix)} ${color.dim(text)}`);
}
};

export const warn = async (prefix: string, text: string) => {
if (stdout.columns < 80) {
log(`${' '.repeat(5)} ${color.yellow('◼')} ${color.yellow(prefix)}`);
log(`${' '.repeat(9)}${color.dim(text)}`);
} else {
log(`${' '.repeat(5)} ${color.yellow('◼')} ${color.yellow(prefix)} ${color.dim(text)}`);
}
};

export const error = async (prefix: string, text: string) => {
if (stdout.columns < 80) {
log(`${' '.repeat(5)} ${color.red('▲')} ${color.red(prefix)}`);
Expand Down

0 comments on commit 0bbd08d

Please sign in to comment.