Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 777 Bytes

20-cli.md

File metadata and controls

14 lines (9 loc) · 777 Bytes

Интерфейс командной строки CLI


SvelteKit projects use Vite, meaning you'll mostly use its CLI (albeit via npm run dev/build/preview scripts):

  • vite dev — start a development server
  • vite build — build a production version of your app
  • vite preview — run the production version locally

However SvelteKit includes its own CLI for initialising your project:

svelte-kit sync

svelte-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.