This is a fork of https://github.com/gojutin/create-svelte-site but with more templates and features.
This is a command line utility, install it globally:
npm i create-svelte -g
yarn global add create-svelte
You’ll need to have Node 8.10.0 or later on your local development machine (but it’s not required on the server). You can use nvm (macOS/Linux) or nvm-windows to easily switch Node versions between different projects.
npx create-svelte myapp
npm init svelte-app myapp
yarn create svelte-app myapp
Note: We are using myapp
as an example. This can be any project name you choose.
You will be prompted to select a template from the official Svelte template library.
After you make your selection, your new site will be created in a directory named myapp
inside the current folder.
Navigate to the newly created directory.
cd myapp
Then, start up the development server.
npm run dev
Your site will be available at http://localhost:5000.
Note: The port may be different depending on the template you chose.
Note: npm run dev
does not apply to the Svelte Native
project type.