You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/01-introduction/02-getting-started.md
+106-2Lines changed: 106 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,11 @@
2
2
title: Getting started
3
3
---
4
4
5
-
We recommend using [SvelteKit](../kit), which lets you [build almost anything](../kit/project-types). It's the official application framework from the Svelte team and powered by [Vite](https://vite.dev/). Create a new project with:
5
+
We recommend using [SvelteKit](../kit), which lets you [build almost anything](../kit/project-types). It's the official application framework from the Svelte team and powered by [Vite](https://vite.dev/).
6
+
7
+
Create a new project with your preferred package manager:
8
+
9
+
**npm:**
6
10
7
11
```sh
8
12
npx sv create myapp
@@ -11,6 +15,35 @@ npm install
11
15
npm run dev
12
16
```
13
17
18
+
**yarn:**
19
+
20
+
```sh
21
+
yarn dlx sv create myapp
22
+
cd myapp
23
+
yarn install
24
+
yarn dev
25
+
```
26
+
27
+
**pnpm:**
28
+
29
+
```sh
30
+
pnpm dlx sv create myapp
31
+
cd myapp
32
+
pnpm install
33
+
pnpm dev
34
+
```
35
+
36
+
**bun:**
37
+
38
+
```sh
39
+
bunx sv create myapp
40
+
cd myapp
41
+
bun install
42
+
bun dev
43
+
```
44
+
45
+
See the [CLI docs](../cli) for more information about the `sv` command line tool.
46
+
14
47
Don't worry if you don't know Svelte yet! You can ignore all the nice features SvelteKit brings on top for now and dive into it later.
15
48
16
49
## Alternatives to SvelteKit
@@ -21,12 +54,83 @@ You can also use Svelte directly with Vite by running `npm create vite@latest` a
21
54
22
55
There are also [plugins for other bundlers](/packages#bundler-plugins), but we recommend Vite.
23
56
57
+
## Installing Svelte in an existing project
58
+
59
+
If you have an existing project for example via [Inertia](https://inertiajs.com/) and want to add Svelte to it, you can install Svelte and [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte) manually.
The Svelte team maintains a [VS Code extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode), and there are integrations with various other [editors](https://sveltesociety.dev/collection/editor-support-c85c080efc292a34) and tools as well.
27
105
28
-
You can also check your code from the command line using [`sv check`](https://github.com/sveltejs/cli).
106
+
You can also check your code from the command line using [`sv check`](https://github.com/sveltejs/cli) to check for Unused CSS
0 commit comments