Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: command descriptions separated to avoid duplication #269

Merged
merged 1 commit into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ program
);

program
.command('init <name> [path]', 'Initialize an Emulsify project', {
.command('init <name> [path]', {
isDefault: true,
})
.description('Initialize an Emulsify project')
.option(
'-m --machineName <machineName>',
'Machine-friendly name of the project you are initializing. If not provided, this will be automatically generated.'
Expand All @@ -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(
Expand All @@ -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(
Expand Down
Loading