Skip to content

Commit

Permalink
fix: improve output readablility
Browse files Browse the repository at this point in the history
  • Loading branch information
winchesHe committed Jul 21, 2024
1 parent ece651c commit cc6fe74
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/actions/add-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export async function addAction(components: string[], options: AddActionOptions)
fixTailwind(type, {errorInfoList, format: prettier, tailwindPath});

Logger.newLine();
Logger.info(`Tailwind CSS settings have been updated in: ${tailwindPath}`);
Logger.log(`Tailwind CSS settings have been updated in: ${tailwindPath}`);
}

/** ======================== Step 3 Provider Need Manually Open ======================== */
Expand Down Expand Up @@ -211,26 +211,26 @@ export async function addAction(components: string[], options: AddActionOptions)
Logger.newLine();
Logger.success('✅ Components added successfully');

// Warn the user to check the NextUIProvider whether in the correct place
Logger.newLine();
Logger.warn(
`Please check the ${chalk.bold(
'NextUIProvider'
)} whether in the correct place (ignore if added)\nSee more info here: ${DOCS_PROVIDER_SETUP}`
);

// Check whether the user has installed the All NextUI components
if ((allDependenciesKeys.has(NEXT_UI) || all) && currentComponents.length) {
// Check whether have added redundant dependencies
Logger.newLine();
Logger.warn(
'Attention: Individual components from NextUI do not require the `@nextui-org/react` package. For optimized bundle sizes, consider using individual components.'
Logger.log(
`${chalk.bold('Attention')}: Individual components from NextUI do not require the \`@nextui-org/react\` package. For optimized bundle sizes, consider using individual components.`
);
Logger.warn('The redundant dependencies are:');
Logger.log('The redundant dependencies are:');
currentComponents.forEach((component) => {
Logger.info(`- ${component.package}`);
Logger.log(`- ${component.package}`);
});
}

// Warn the user to check the NextUIProvider whether in the correct place
Logger.newLine();
Logger.log(
`Please check the ${chalk.bold(
'NextUIProvider'
)} whether in the correct place (ignore if added)\nSee more info here: ${DOCS_PROVIDER_SETUP}`
);

process.exit(0);
}

0 comments on commit cc6fe74

Please sign in to comment.