Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
skoriop committed Dec 24, 2023
1 parent 47787d0 commit 474e308
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/cli/src/commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ export const add = new Command()
await fs.mkdir(targetDir, { recursive: true });
}

const componentPath = path.relative(process.cwd(), path.resolve(targetDir, item.name));
const componentPath = path.relative(
process.cwd(),
path.resolve(targetDir, item.name)
);

const existingComponent = item.files.filter((file) =>
existsSync(path.resolve(targetDir, item.name, file.name))
Expand All @@ -178,9 +181,7 @@ export const add = new Command()
if (existingComponent.length && !options.overwrite) {
if (selectedComponents.includes(item.name)) {
logger.warn(
`\nComponent already exists at ${
componentPath
}. Use ${chalk.green(
`\nComponent already exists at ${componentPath}. Use ${chalk.green(
"--overwrite"
)} to overwrite.`
);
Expand Down Expand Up @@ -246,11 +247,10 @@ export const add = new Command()
}
spinner.succeed(`Done.`);
logger.info(
`Components installed at:\n- ${[
...componentPaths
].join("\n- ")}`
`Components installed at:\n- ${[...componentPaths].join(
"\n- "
)}`
);

} catch (error) {
handleError(error);
}
Expand Down

0 comments on commit 474e308

Please sign in to comment.