Skip to content

Commit bbdf8c4

Browse files
Sync cli docs (#1323)
sync cli docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent be6db33 commit bbdf8c4

File tree

12 files changed

+300
-0
lines changed

12 files changed

+300
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: drizzle
4+
---
5+
6+
[Drizzle ORM](https://orm.drizzle.team/) is a TypeScript ORM offering both relational and SQL-like query APIs, and which is serverless-ready by design.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add drizzle
12+
```
13+
14+
## What you get
15+
16+
- a setup that keeps your database access in SvelteKit's server files
17+
- an `.env` file to store your credentials
18+
- compatibility with the Lucia auth add-on
19+
- an optional Docker configuration to help with running a local database
20+
21+
## Options
22+
23+
### database
24+
25+
Which database variant to use:
26+
27+
- `postgresql` — the most popular open source database
28+
- `mysql` — another popular open source database
29+
- `sqlite` — file-based database not requiring a database server
30+
31+
```bash
32+
npx sv add --drizzle=postgresql
33+
```
34+
35+
### client
36+
37+
The SQL client to use, depends on `database`:
38+
39+
- For `postgresql`: `postgres.js`, `neon`,
40+
- For `mysql`: `mysql2`, `planetscale`
41+
- For `sqlite`: `better-sqlite3`, `libsql`, `turso`
42+
43+
```bash
44+
npx sv add --drizzle=postgresql,postgres.js
45+
```
46+
47+
Drizzle is compatible with well over a dozen database drivers. We just offer a few of the most common ones here for simplicity, but if you'd like to use another one you can choose one as a placeholder and swap it out for another after setup by choosing from [Drizzle's full list of compatible drivers](https://orm.drizzle.team/docs/connect-overview#next-steps).
48+
49+
### docker
50+
51+
Whether to add Docker Compose configuration. Only available for [`database`](#Options-database) `postgresql` or `mysql`
52+
53+
- `docker` - generates `docker-compose.yml`
54+
- `no-docker` - does not generate docker config
55+
56+
```bash
57+
npx sv add --drizzle=postgresql,postgres.js,docker
58+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: eslint
4+
---
5+
6+
[ESLint](https://eslint.org/) finds and fixes problems in your code.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add eslint
12+
```
13+
14+
## What you get
15+
16+
- the relevant packages installed including `eslint-plugin-svelte`
17+
- an `eslint.config.js` file
18+
- updated `.vscode/settings.json`
19+
- configured to work with TypeScript and `prettier` if you're using those packages
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: lucia
4+
---
5+
6+
An auth setup following [the Lucia auth guide](https://lucia-auth.com/).
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add lucia
12+
```
13+
14+
## What you get
15+
16+
- an auth setup for SvelteKit and Drizzle following the best practices from the Lucia auth guide
17+
- optional demo registration and login pages
18+
19+
## Options
20+
21+
### demo
22+
23+
Whether to include demo registration and login pages.
24+
25+
```bash
26+
npx sv add --lucia=demo
27+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: mdsvex
4+
---
5+
6+
[mdsvex](https://mdsvex.pngwn.io) is a markdown preprocessor for Svelte components - basically MDX for Svelte. It allows you to use Svelte components in your markdown, or markdown in your Svelte components.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add mdsvex
12+
```
13+
14+
## What you get
15+
16+
- mdsvex installed and configured in your `svelte.config.js`
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: paraglide
4+
---
5+
6+
[Paraglide from Inlang](https://inlang.com/m/gerre34r/library-inlang-paraglideJs) is a compiler-based i18n library that emits tree-shakable message functions with small bundle sizes, no async waterfalls, full type-safety, and more.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add paraglide
12+
```
13+
14+
## What you get
15+
16+
- Inlang project settings
17+
- paraglide Vite plugin
18+
- SvelteKit `reroute` and `handle` hooks
19+
- `text-direction` and `lang` attributes in `app.html`
20+
- updated `.gitignore`
21+
- an optional demo page showing how to use paraglide
22+
23+
## Options
24+
25+
### availableLanguageTags
26+
27+
The languages you'd like to support specified as IETF BCP 47 language tags.
28+
29+
```bash
30+
npx sv add --paraglide=en,es
31+
```
32+
33+
### demo
34+
35+
Whether to generate an optional demo page showing how to use paraglide.
36+
37+
```bash
38+
npx sv add --paraglide=demo
39+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: playwright
4+
---
5+
6+
[Playwright](https://playwright.dev) browser testing.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add playwright
12+
```
13+
14+
## What you get
15+
16+
- scripts added in your `package.json`
17+
- a Playwright config file
18+
- an updated `.gitignore`
19+
- a demo test
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: prettier
4+
---
5+
6+
[Prettier](https://prettier.io) is an opinionated code formatter.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add prettier
12+
```
13+
14+
## What you get
15+
16+
- scripts in your `package.json`
17+
- `.prettierignore` and `.prettierrc` files
18+
- updates to your eslint config if you're using that package
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: storybook
4+
---
5+
6+
[Storybook](https://storybook.js.org/) is a frontend component workshop.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add storybook
12+
```
13+
14+
## What you get
15+
16+
- `npx storybook init` run for you from the same convenient `sv` CLI used for all other add-ons
17+
- [Storybook for SvelteKit](https://storybook.js.org/docs/get-started/frameworks/sveltekit) or [Storybook for Svelte & Vite](https://storybook.js.org/docs/get-started/frameworks/svelte-vite) with default config provided, easy mocking of many SvelteKit modules, automatic link handling, and more.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: sveltekit-adapter
4+
---
5+
6+
[SvelteKit adapters](/docs/kit/adapters) allow you to deploy your site to numerous platforms. This add-on allows you to configure officially provided SvelteKit adapters, but a number of [community-provided adapters](https://www.sveltesociety.dev/packages?category=sveltekit-adapters) are also available.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add sveltekit-adapter
12+
```
13+
14+
## What you get
15+
16+
- the chosen SvelteKit adapter installed and configured in your `svelte.config.js`
17+
18+
## Options
19+
20+
### adapter
21+
22+
Which SvelteKit adapter to use:
23+
24+
- `auto`[`@sveltejs/adapter-auto`](/docs/kit/adapter-auto) automatically chooses the proper adapter to use, but is less configurable
25+
- `node`[`@sveltejs/adapter-node`](/docs/kit/adapter-node) generates a standalone Node server
26+
- `static`[`@sveltejs/adapter-static`](/docs/kit/adapter-static) allows you to use SvelteKit as a static site generator (SSG)
27+
- `vercel`[`@sveltejs/adapter-vercel`](/docs/kit/adapter-vercel) allows you to deploy to Vercel
28+
- `cloudflare`[`@sveltejs/adapter-cloudflare`](/docs/kit/adapter-cloudflare) allows you to deploy to Cloudflare
29+
- `netlify`[`@sveltejs/adapter-netlify`](/docs/kit/adapter-netlify) allows you to deploy to Netlify
30+
31+
```bash
32+
npx sv add --sveltekit-adapter=node
33+
```
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: tailwindcss
4+
---
5+
6+
[Tailwind CSS](https://tailwindcss.com/) allows you to rapidly build modern websites without ever leaving your HTML.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add tailwindcss
12+
```
13+
14+
## What you get
15+
16+
- Tailwind setup following the [Tailwind for SvelteKit guide](https://tailwindcss.com/docs/installation/framework-guides/sveltekit)
17+
- Tailwind Vite plugin
18+
- updated `app.css` and `+layout.svelte` (for SvelteKit) or `App.svelte` (for non-SvelteKit Vite apps)
19+
- integration with `prettier` if using that package
20+
21+
## Options
22+
23+
### plugins
24+
25+
Which plugin to use:
26+
27+
- `typography`[`@tailwindcss/typography`](https://github.com/tailwindlabs/tailwindcss-typography)
28+
- `forms`[`@tailwindcss/forms`](https://github.com/tailwindlabs/tailwindcss-forms)
29+
30+
```bash
31+
npx sv add --tailwindcss=typography
32+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: vitest
4+
---
5+
6+
[Vitest](https://vitest.dev/) is a Vite-native testing framework.
7+
8+
## Usage
9+
10+
```bash
11+
npx sv add vitest
12+
```
13+
14+
## What you get
15+
16+
- the relevant packages installed and scripts added to your `package.json`
17+
- client/server-aware testing setup for Svelte in your Vite config file
18+
- demo tests
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
NOTE: do not edit this file, it is generated in apps/svelte.dev/scripts/sync-docs/index.ts
3+
title: Add-ons
4+
---

0 commit comments

Comments
 (0)