svgl/README.md

39 lines
944 B
Markdown
Raw Normal View History

2023-03-14 21:08:22 +00:00
# create-svelte
2022-03-04 13:34:58 +00:00
2023-03-14 21:08:22 +00:00
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
2022-06-20 15:27:28 +01:00
2023-03-14 21:08:22 +00:00
## Creating a project
2022-01-16 14:40:15 +00:00
2023-03-14 21:08:22 +00:00
If you're seeing this, you've probably already done this step. Congrats!
2022-01-16 14:40:15 +00:00
```bash
2023-03-14 21:08:22 +00:00
# create a new project in the current directory
npm create svelte@latest
2023-03-14 21:08:22 +00:00
# create a new project in my-app
npm create svelte@latest my-app
2022-06-26 18:43:23 +01:00
```
2023-03-14 21:08:22 +00:00
## Developing
2022-06-26 18:43:23 +01:00
2023-03-14 21:08:22 +00:00
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
2022-06-26 18:43:23 +01:00
```bash
2023-03-14 21:08:22 +00:00
npm run dev
2022-06-26 18:43:23 +01:00
2023-03-14 21:08:22 +00:00
# or start the server and open the app in a new browser tab
npm run dev -- --open
2022-06-26 18:43:23 +01:00
```
2023-03-14 21:08:22 +00:00
## Building
2022-01-16 14:40:15 +00:00
2023-03-14 21:08:22 +00:00
To create a production version of your app:
```bash
2023-03-14 21:08:22 +00:00
npm run build
```
2023-03-14 21:08:22 +00:00
You can preview the production build with `npm run preview`.
2022-01-16 14:40:15 +00:00
2023-03-14 21:08:22 +00:00
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.