Skip to content

Commit

Permalink
refactor(add): show description for template positional arg (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinGangan authored Feb 14, 2024
1 parent 9995400 commit 8ba7e5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ export default defineCommand({
type: 'positional',
required: true,
valueHint: Object.keys(templates).join('|'),
description: `Template type to scafold`,
},
name: {
type: 'positional',
required: true,
valueHint: 'name',
description: 'Generated file name',
},
},
async run(ctx) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const page: Template = ({ name }) => ({
<template>
<div>
Page: foo
Page: ${name}
</div>
</template>
Expand Down

0 comments on commit 8ba7e5d

Please sign in to comment.