sveltejs / template

Template for building basic applications with Svelte

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Easier access to typescript starter template

dreitzner opened this issue · comments

Is your feature request related to a problem? Please describe.
there is no npx degit sveltejs/template-typescript my-svelte-project
So there is no good reference for adding typescript at a later point.

Describe the solution you'd like
I would do the following:

  • add the info to startpage (has to be done in sveltejs/svelte/site)
  • add the info to /blog/the-easiest-way-to-get-started (sveltejs/svelte/site)
  • create a typescript template with github action

Describe alternatives you've considered
The alternative would be to just keep the current setup script.
This might do some unwanted stuff when running it in an existing project.

How important is this feature to you?
I would implement it... should be preaty straight forward.

Additional context
A drawback might be that 2 templates would need to be kept up to date in the future.

We discussed keeping 2 templates before and decided against it because of the maintenance overhead. Making it more visible is a good idea though.

For create-react-app they go --template typescript. Could something like that be a happy medium?

As we are copying a repo and don't have a CLI that is not possible at the moment (I saw something in the svelte-kit demo, so maybe there)

@dummdidumm maybe we can have one template and just adapt the build process so it automatically copies the base template and runs the node setup script on it?

@Conduitry I think my suggestion would primarily do changes to documentation in sveltejs/svelte/site

I'll look into github actions and append my findings here. We might be able to run that and auto generate a typescript template

Is done in pull request #207

Is there any help needed to move this along?

I would be happy to help 😃

The create-svelte@next CLI for SvelteKit includes an option for adding TypeScript support while initializing a new project. SvelteKit isn't quite out of beta, but it is going to be the recommended way to write a Svelte app going forward. This repo is going to be deprecated and archived sometime in the near-ish future, so we'd prefer not to be making any big changes to it now or adding new features.