Skip to content

Commit 236fbb2

Browse files
committed
sync
1 parent e5b32da commit 236fbb2

File tree

13 files changed

+296
-329
lines changed

13 files changed

+296
-329
lines changed

apps/svelte.dev/content/docs/cli/10-introduction/10-overview.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,18 @@
22
title: Overview
33
---
44

5-
`sv`, the Svelte CLI, aims to combine multiple tools into one single easy to remember command.
5+
The command line interface (CLI), `sv`, is a toolkit for creating and maintaining Svelte applications.
66

77
## Usage
88

9-
The best way to use our cli is to run one of the following commands, depending on your package manager
9+
The easiest way to run `sv` is with [`npx`](https://docs.npmjs.com/cli/v8/commands/npx) (or the equivalent command if you're using a different package manager — for example, `pnpx` if you're using [pnpm](https://pnpm.io/)):
1010

1111
```bash
1212
npx sv <command> <args>
13-
pnpx sv <command> <args>
14-
# todo: should we add other package managers or just leave npx? Same goes for all other snippets
1513
```
1614

17-
## Commands
15+
If you're inside a project where `sv` is already installed, this will use the local installation, otherwise it will download the latest version and run it without installing it, which is particularly useful for [`sv create`](sv-create).
1816

19-
| Command | Sample usage | Description |
20-
| ------------------ | -------------------------------- | ---------------------------------------------- |
21-
| [`create`](create) | `npx sv create ./my-project` | Scaffolds new projects |
22-
| [add](add) | `npx sv add [adder...]` | Customize your projects to add different tools |
23-
| migrate | `npx sv migrate <migrationName>` | Migrate your project |
24-
| check | `npx sv check` | Typecheck your Svelte files |
17+
## Acknowledgements
18+
19+
Thank you to [Christopher Brown](https://github.com/chbrown) who originally owned the `sv` name on npm for graciously allowing it to be used for the Svelte CLI. You can find the original `sv` package at [`@chbrown/sv`](https://www.npmjs.com/package/@chbrown/sv).

apps/svelte.dev/content/docs/cli/20-commands/10-create.md

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: sv create
3+
---
4+
5+
`sv create` sets up a new SvelteKit project, with options to [setup additional functionality](sv-add#Official-integrations).
6+
7+
## Usage
8+
9+
```bash
10+
npx sv create [options] [path]
11+
```
12+
13+
## Options
14+
15+
<!-- TODO this flag should probably just be '--types', and the options should be 'ts' or 'jsdoc' -->
16+
17+
### `--check-types <option>`
18+
19+
Whether and how to add typechecking to the project:
20+
21+
- `typescript` — default to `.ts` files and use `lang="ts"` for `.svelte` components
22+
- `checkjs` — use [JSDoc syntax](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html) for types
23+
- `none` — no typechecking. Not recommended!
24+
25+
### `--template <name>`
26+
27+
Which project template to use:
28+
29+
- `minimal` — barebones scaffolding for your new app
30+
- `demo` — showcase app with a word guessing game that works without JavaScript
31+
- `library` — template for a Svelte library, set up with `svelte-package`
32+
33+
### `--no-integrations`
34+
35+
<!-- TODO should be renamed to `--no-addons` -->
36+
37+
Run the command without the interactive add-ons prompt
38+
39+
### `--no-install`
40+
41+
Skip dependency installation
42+
43+
<!-- ## Programmatic interface
44+
45+
```js
46+
// TODO: this gives type checking errors in the docs site when not commented out. Need to release sv, install it in the site, and uncomment this.
47+
// import { create } from 'sv';
48+
49+
// // todo: check if this is right
50+
// create(cwd, {
51+
// // add your options here
52+
// // todo: list available option
53+
// });
54+
```
55+
-->

apps/svelte.dev/content/docs/cli/20-commands/20-add.md

Lines changed: 0 additions & 65 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: sv add
3+
---
4+
5+
`sv add` updates an existing project with new functionality.
6+
7+
## Usage
8+
9+
```bash
10+
npx sv add
11+
```
12+
13+
```bash
14+
npx sv add [add-ons]
15+
```
16+
17+
You can select multiple space-separated add-ons from [the list below](#Official-add-ons), or you can use the interactive prompt.
18+
19+
## Options
20+
21+
- `-C`, `--cwd` — path to the root of your Svelte(Kit) project
22+
- `--no-preconditions` — skip checking preconditions <!-- TODO what does this mean? -->
23+
- `--no-install` — skip dependency installation
24+
25+
## Official add-ons
26+
27+
<!-- TODO this should be a separate section, each of these should have their own page -->
28+
29+
- `drizzle`
30+
- `eslint`
31+
- `lucia`
32+
- `mdsvex`
33+
- `paraglide`
34+
- `playwright`
35+
- `prettier`
36+
- `routify`
37+
- `storybook`
38+
- `tailwindcss`
39+
- `vitest`

apps/svelte.dev/content/docs/cli/20-commands/30-check.md

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)