Search code examples
javascriptshellnpmyarnpkg

How do I create and publish 'npm create' scripts?


I'd like to create and publish on npm a script that runs in a similar way of:

npm create qwik@latest

or

yarn create next-app --typescript

but I don't know how to start. I googled a lot but with no results.

Can you please point me in the right direction?


Solution

  • You have to start your package's name with create-

    Examples:

    create-qwik
    
    create-react-app
    
    create-next-app