From ad785010c2104b0620cf302d51306c4f28348a1f Mon Sep 17 00:00:00 2001 From: adrien2p Date: Sun, 14 Aug 2022 11:36:10 +0200 Subject: [PATCH] style(cli): Update naming --- src/cli/commands/init.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cli/commands/init.ts b/src/cli/commands/init.ts index 9bde297b..fa8161f3 100644 --- a/src/cli/commands/init.ts +++ b/src/cli/commands/init.ts @@ -13,7 +13,7 @@ const logger = Logger.contextualize('Init command', 'MEDEX-CLI'); export async function init(): Promise { logger.log('Initialising medusa-extender...'); - logger.log('[Packages] Check that the packages are installed'); + logger.log('[packages] Check that the packages are installed'); await loadPackages(logger, [ { name: 'typescript', version: '4.5.5', isDevDependency: true }, { name: 'nodemon', version: '2.0.15', isDevDependency: true }, @@ -22,7 +22,7 @@ export async function init(): Promise { await updatePackageJson(); await updateTsconfigJson(); - logger.log('[Modules] Creating example module'); + logger.log('[modules] Creating example module'); generateComponent('example', { module: true, service: true, router: true, path: 'src/modules/example' }); generateEntryPoint(); @@ -36,7 +36,7 @@ export async function init(): Promise { * Update the package.json with the required scripts to work. */ async function updatePackageJson(): Promise { - logger.log('[Scripts] Update package.json scripts'); + logger.log('[scripts] Update package.json scripts'); const packageJsonPath = resolve(process.cwd(), 'package.json'); const packageJson = await import(packageJsonPath); packageJson.scripts = { @@ -55,7 +55,7 @@ async function updatePackageJson(): Promise { * Update or create the tsconfig.json file with the required configuration. */ async function updateTsconfigJson(): Promise { - logger.log('[TsConfig] Create or update tsconfig.json'); + logger.log('[tsConfig] Create or update tsconfig.json'); const tsconfigPath = resolve(process.cwd(), 'tsconfig.json'); const isTsConfigExists = existsSync(tsconfigPath); if (!isTsConfigExists) { @@ -120,7 +120,7 @@ async function updateTsconfigJson(): Promise { * Generate the main.ts entry point. */ function generateEntryPoint(): void { - logger.log('[Entry point] Creating entry point main.ts file'); + logger.log('[entry point] Creating entry point main.ts file'); writeFileSync(resolve(process.cwd(), 'src', 'main.ts'), getMainEntryPointTemplate()); } @@ -129,7 +129,7 @@ function generateEntryPoint(): void { * Update the existing develop shell script provided by medusa to fit the new requirements. */ function updateDevelopScript(): void { - logger.log('[Develop script] Update medusa develop.sh script'); + logger.log('[develop script] Update medusa develop.sh script'); const developShPath = resolve(process.cwd(), 'develop.sh'); writeFileSync( developShPath,