denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.17k stars 5.37k forks source link

Deno equivalent for `npm create ...` #26461

Open bartlomieju opened 1 week ago

bartlomieju commented 1 week ago

Currently there's no easy way to translate npm create (or yarn/pnpm create) calls to deno ... calls.

Consider the example:

npm create vite@latest
deno run -A npm:create-vite@latest

That's 24 chars vs 34 characters. And the user needs to now that npm create <package> is equal to deno run npm:create-<package>.

We need a better solution here and fast.

One obvious choice is to overload the deno init command to work like this:

deno init -A npm:vite@latest

There are a couple problems with it though:

raashidanwar commented 1 week ago

@bartlomieju I would like to work on this feature.

raashidanwar commented 1 week ago

npm create is an alias of npm init I think we just need to implement one, however implementing both won't be a lot of effort I believe. Popularity of npm init is more so we should implement this only.

bartlomieju commented 1 week ago

@raashidanwar thanks, but the core team hasn't agreed yet on how exactly this will work.

raashidanwar commented 1 week ago

@raashidanwar thanks, but the core team hasn't agreed yet on how exactly this will work.

Sure. Let me know when they finalized the plan. Would love to implement this.

bartlomieju commented 1 week ago

Ref https://github.com/denoland/deno/issues/22383