Skip to content

Commit

Permalink
Write docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rChaoz committed Jan 15, 2025
1 parent 11344b2 commit bd46b33
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions documentation/docs/20-commands/50-sv-kit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: sv kit
---

`sv kit` is a tiny CLI tool that helps you initialize and update your SvelteKit project.

As SvelteKit projects use [Vite](https://vitejs.dev/), you'll mostly be using Vite's CLI commands to build and run your project:
- `vite dev` — start a development server
- `vite build` — build a production version of your app
- `vite preview` — run the production version locally

## Installation

`sv kit` is available in SvelteKit projects, i.e. you will need the `@sveltejs/kit` package to use it. You can use `sv create` to [create and set up](sv-create) a new SvelteKit project. You can also check out SvelteKit's [documentation](/docs/kit) for more information.

## Usage

```bash
npx sv kit sync
```

`sv kit sync` creates the `tsconfig.json` and all generated types (which you can import as `./$types` inside routing files) for your project. When you create a new project, it is listed as the `prepare` script and will be run automatically as part of the npm lifecycle, so you should not ordinarily have to run this command.

You can run this command manually to ensure the generated types and `tsconfig.json` are up to date with your project and configuration. It may also be necessary to run this command as part of your CI pipeline.

0 comments on commit bd46b33

Please sign in to comment.