svgl/README.md

39 lines
944 B
Markdown
Raw Normal View History

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