sveltejs/sapper-template

compatibility with npm init

alexkrolick opened this issue · 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 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.

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)

sounds good to me!

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

@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.