From 065db38071b32e4f8e29467bff5bc2176a0e0640 Mon Sep 17 00:00:00 2001 From: Carlos Valencia Date: Wed, 8 May 2024 21:41:53 -0500 Subject: [PATCH] fix: command descriptions separated to avoid duplication --- src/index.ts | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/index.ts b/src/index.ts index aa3a750..c87067f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,9 +16,10 @@ program ); program - .command('init [path]', 'Initialize an Emulsify project', { + .command('init [path]', { isDefault: true, }) + .description('Initialize an Emulsify project') .option( '-m --machineName ', 'Machine-friendly name of the project you are initializing. If not provided, this will be automatically generated.' @@ -38,20 +39,21 @@ program .action(withProgressBar(init)); // System sub-commands. -const system = program.command( - 'system', - 'Parent command that contains sub-commands pertaining to systems' -); +const system = program + .command('system') + .description( + 'Parent command that contains sub-commands pertaining to systems' + ); system - .command( - 'list', + .command('list') + .description( 'Lists all of the available systems that Emulsify supports out-of-the-box' ) .alias('ls') .action(systemList); system - .command( - 'install [name]', + .command('install [name]') + .description( 'Install a system within an Emulsify project. You must specify either the name of an out-of-the-box system (such as compound), or a link to a git repository containing the system you want to install' ) .option( @@ -74,15 +76,15 @@ const component = program.command( 'Parent command that contains sub-commands pertaining to components' ); component - .command( - 'list', + .command('list') + .description( 'Lists all of the components that are available for installation within your project based on the system and variant you selected' ) .alias('ls') .action(componentList); component - .command( - 'install [name]', + .command('install [name]') + .description( "Install a component from within the current project's system and variant" ) .option(