generate-svelte-app

Quick way to start your svelte app

Usage no npm install needed!

<script type="module">
  import generateSvelteApp from 'https://cdn.skypack.dev/generate-svelte-app';
</script>

README

Generate Svelte App

Quick way to start your Svelte app

oclif Version Downloads/week License

Why

The only reason this CLI exists is the fact Svelte still does not have some easy way to get started with a project like create-react-app, vue-cli or angular-cli.

Officially they have this tutorial, which suggests using degit to fetch a svelte template but IMO it's still a lot of work to do.

Another thing is in this specific template their are using sirv-cli which for some reason has some weird bug when you start the project.

In a nutshell, this CLI is using their template with some small changes in the server to proper run locally and also starts your project running one command.

Usage

First you have to install the CLI globally:

yarn global add generate-svelte-app
# Or if you're using Npm
# npm install generate-svelte-app --global

Then, you can call the CLI passing your project name:

generate-svelte-app -n my-awesome-project

It'll automatically create your project with the basic svelte files. All you need to do is start your app:

cd my-awesome-project
yarn start

Commands

Command Alias Description Default
--name -n Your project name
--npm Set to use npm yarn

License

MIT