···1+# sv
2+3+Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
4+5+## Creating a project
6+7+If you're seeing this, you've probably already done this step. Congrats!
8+9+```bash
10+# create a new project in the current directory
11+npx sv create
12+13+# create a new project in my-app
14+npx sv create my-app
15+```
16+17+## Developing
18+19+Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20+21+```bash
22+npm run dev
23+24+# or start the server and open the app in a new browser tab
25+npm run dev -- --open
26+```
27+28+## Building
29+30+To create a production version of your app:
31+32+```bash
33+npm run build
34+```
35+36+You can preview the production build with `npm run preview`.
37+38+> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
···1+// place files you want to import through the `$lib` alias in this folder.
+7
src/routes/+layout.svelte
···0000000
···1+<script lang="ts">
2+ import "../app.css";
3+4+ let { children } = $props();
5+</script>
6+7+{@render children()}
+5
src/routes/+page.svelte
···00000
···1+<h1>Welcome to SvelteKit</h1>
2+<p>
3+ Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the
4+ documentation
5+</p>
static/favicon.png
This is a binary file and will not be displayed.
+18
svelte.config.js
···000000000000000000
···1+import adapter from "@sveltejs/adapter-auto";
2+import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
3+4+/** @type {import('@sveltejs/kit').Config} */
5+const config = {
6+ // Consult https://svelte.dev/docs/kit/integrations
7+ // for more information about preprocessors
8+ preprocess: vitePreprocess(),
9+10+ kit: {
11+ // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
12+ // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
13+ // See https://svelte.dev/docs/kit/adapters for more information about adapters.
14+ adapter: adapter(),
15+ },
16+};
17+18+export default config;
+19
tsconfig.json
···0000000000000000000
···1+{
2+ "extends": "./.svelte-kit/tsconfig.json",
3+ "compilerOptions": {
4+ "allowJs": true,
5+ "checkJs": true,
6+ "esModuleInterop": true,
7+ "forceConsistentCasingInFileNames": true,
8+ "resolveJsonModule": true,
9+ "skipLibCheck": true,
10+ "sourceMap": true,
11+ "strict": true,
12+ "moduleResolution": "bundler"
13+ }
14+ // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
15+ // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
16+ //
17+ // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
18+ // from the referenced tsconfig.json - TypeScript does not merge them in
19+}
+7
vite.config.ts
···0000000
···1+import tailwindcss from "@tailwindcss/vite";
2+import { sveltekit } from "@sveltejs/kit/vite";
3+import { defineConfig } from "vite";
4+5+export default defineConfig({
6+ plugins: [tailwindcss(), sveltekit()],
7+});