0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
svelte/documentation/docs/01-getting-started/01-introduction.md
Rich Harris 27538fc598
tweak docs content (#8675)
* update intro

* update tutorial links

* unitalicise code spans

* Update documentation/docs/01-getting-started/01-introduction.md

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* Update documentation/docs/01-getting-started/01-introduction.md

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* Update documentation/docs/01-getting-started/01-introduction.md

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* Update documentation/docs/01-getting-started/01-introduction.md

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

---------

Co-authored-by: Rich Harris <git@rich-harris.dev>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2023-06-01 15:44:16 -04:00

2.2 KiB

title
Introduction

Welcome to the Svelte reference documentation! This is intended as a resource for people who already have some familiarity with Svelte and want to learn more about using it.

If that's not you (yet), you may prefer to visit the interactive tutorial or the examples before consulting this reference. You can try Svelte online using the REPL. Alternatively, if you'd like a more fully-featured environment, you can try Svelte on StackBlitz.

Start a new project

We recommend using SvelteKit, the official application framework from the Svelte team:

npm create svelte@latest myapp
cd myapp
npm install
npm run dev

SvelteKit will handle calling the Svelte compiler to convert your .svelte files into .js files that create the DOM and .css files that style it. It also provides all the other pieces you need to build a web application such as a development server, routing, deployment, and SSR support. SvelteKit uses Vite to build your code.

Alternatives to SvelteKit

If you don't want to use SvelteKit for some reason, you can also use Svelte with Vite (but without SvelteKit) by running npm init vite and selecting the svelte option. With this, npm run build will generate HTML, JS and CSS files inside the dist directory. In most cases, you will probably need to choose a routing library as well.

Alternatively, there are plugins for all the major web bundlers to handle Svelte compilation — which will output .js and .css that you can insert into your HTML — but most others won't handle SSR.

Editor tooling

The Svelte team maintains a VS Code extension and there are integrations with various other editors and tools as well.

Getting help

Don't be shy about asking for help in the Discord chatroom! You can also find answers on Stack Overflow.