vite icon indicating copy to clipboard operation
vite copied to clipboard

create-vite: add CLI argument help

Open milahu opened this issue 1 year ago • 6 comments

Description

npx create-vite --help should show help for command line usage

Suggested solution

something like ...

Usage: create-vite [OPTION]... [DIRECTORY]
Create a new JavaScript project based on Vite.

With no arguments, start an interactive command line dialog.

Options:
  -t, --template NAME        use this template

Available templates:
...

Alternative

read the source of create-vite to find the CLI arguments

const argv = minimist<{
  t?: string
  template?: string
}>(process.argv.slice(2), { string: ['_'] })

Additional context

No response

Validations

milahu avatar Apr 07 '24 17:04 milahu

Hello, i did some changes, what do you think?

image

edvardsanta avatar Apr 10 '24 13:04 edvardsanta

im blinded by the colors ; )

what will you do in the future, when you run out of colors?

i would rather group the templates into lines

vanilla vanilla-ts
vue vue-ts custom-create-vue custom-nuxt
react react-ts ...
preact ...
lit ...

milahu avatar Apr 10 '24 16:04 milahu

interesting, thanks for the point. I just added the colors thinking that when we create a new project the templates are shown with colors

edvardsanta avatar Apr 10 '24 19:04 edvardsanta

like that? image

edvardsanta avatar Apr 10 '24 20:04 edvardsanta

yepp. except i would put the -ts versions second

(also, please stop posting screenshots of text...)

milahu avatar Apr 11 '24 10:04 milahu

I prefer the version where 'ts' comes first; I'll await feedback in the PR.

edvardsanta avatar Apr 13 '24 02:04 edvardsanta