sapper-template icon indicating copy to clipboard operation
sapper-template copied to clipboard

compatibility with npm init

Open alexkrolick opened this issue 4 years ago • 5 comments

As an alternative to degit, npm now supports a template in the init command.

https://docs.npmjs.com/cli/init

Usage could look like this

npm init @sveltejs/sapper --webpack

EDIT: Actually it looks like @eps1lon already made the package that does this. IMO this should be upstreamed and documented as the default. https://github.com/eps1lon/create-sapper-app

alexkrolick avatar Mar 15 '20 00:03 alexkrolick

@alexkrolick Thanks for the pointer - it would be nice to have this, as a convenience wrapper for degit. I can personally see the value in this for a Sapper application, which has a fair amount of initial structure.

However, this is probably the wrong repository for it, so moving to the Sapper repository.

antony avatar Apr 02 '20 07:04 antony

As an alternative to degit, npm now supports a template in the init command.

https://docs.npmjs.com/cli/init

Usage could look like this

npm init @sveltejs/sapper --webpack

EDIT: Actually it looks like @eps1lon already made the package that does this. IMO this should be upstreamed and documented as the default. https://github.com/eps1lon/create-sapper-app

You can create a Svelte project using npm init svelte. In the process, you can choose what to create (svelte, svelte native or sapper), as well as which bundler to use. Try it. If it suits you, then I will update the documentation. 2020-04-11 (4) 2020-04-11 (5)

dmtrshat avatar Apr 11 '20 14:04 dmtrshat

sounds good to me!

alexkrolick avatar Apr 11 '20 18:04 alexkrolick

Why is this not featured in the Sapper landing page? This is a pretty nice way to start

tejas-hosamani avatar May 26 '20 12:05 tejas-hosamani

@CodingCreate101 Things that are listed on the Sapper landing page are things that we can officially maintain and support. I agree it's a nice way to start, but it's a risk to put things that are not under our control onto an official site, especially for something this core. This isn't to say it will never happen, however.

antony avatar May 26 '20 12:05 antony