diff --git a/.changeset/grumpy-poems-act.md b/.changeset/grumpy-poems-act.md new file mode 100644 index 00000000..9d555733 --- /dev/null +++ b/.changeset/grumpy-poems-act.md @@ -0,0 +1,5 @@ +--- +"composable-cli": patch +--- + +d2c is not the default command for generated meaning you don't need to pass the "d2c" argument diff --git a/packages/composable-cli/src/commands/generate/d2c/d2c-command.tsx b/packages/composable-cli/src/commands/generate/d2c/d2c-command.tsx index e6a71b15..5fc2c92d 100644 --- a/packages/composable-cli/src/commands/generate/d2c/d2c-command.tsx +++ b/packages/composable-cli/src/commands/generate/d2c/d2c-command.tsx @@ -65,7 +65,7 @@ export function createD2CCommand( ctx: CommandContext, ): yargs.CommandModule { return { - command: "d2c [name]", + command: ["d2c [name]", "$0 [name]"], aliases: ["storefront"], describe: "generate Elasticpath storefront", builder: async (yargs) => { diff --git a/packages/composable-cli/src/commands/generate/generate-command.tsx b/packages/composable-cli/src/commands/generate/generate-command.tsx index 039d60b5..8fc4d5c9 100644 --- a/packages/composable-cli/src/commands/generate/generate-command.tsx +++ b/packages/composable-cli/src/commands/generate/generate-command.tsx @@ -64,7 +64,6 @@ export function createGenerateCommand( "boolean-negation": true, "strip-aliased": true, }) - .demandCommand(1) .strict() }, handler: ctx.handleErrors(