···11+# sv
22+33+Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
44+55+## Creating a project
66+77+If you're seeing this, you've probably already done this step. Congrats!
88+99+```sh
1010+# create a new project
1111+npx sv create my-app
1212+```
1313+1414+To recreate this project with the same configuration:
1515+1616+```sh
1717+# recreate this project
1818+npx sv@0.15.1 create --template minimal --types ts --add prettier eslint vitest="usages:unit,component" tailwindcss="plugins:none" --install npm playground
1919+```
2020+2121+## Developing
2222+2323+Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
2424+2525+```sh
2626+npm run dev
2727+2828+# or start the server and open the app in a new browser tab
2929+npm run dev -- --open
3030+```
3131+3232+## Building
3333+3434+To create a production version of your app:
3535+3636+```sh
3737+npm run build
3838+```
3939+4040+You can preview the production build with `npm run preview`.
4141+4242+> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
+44
playground/eslint.config.js
···11+import prettier from 'eslint-config-prettier';
22+import path from 'node:path';
33+import { includeIgnoreFile } from '@eslint/compat';
44+import js from '@eslint/js';
55+import svelte from 'eslint-plugin-svelte';
66+import { defineConfig } from 'eslint/config';
77+import globals from 'globals';
88+import ts from 'typescript-eslint';
99+import svelteConfig from './svelte.config.js';
1010+1111+const gitignorePath = path.resolve(import.meta.dirname, '.gitignore');
1212+1313+export default defineConfig(
1414+ includeIgnoreFile(gitignorePath),
1515+ js.configs.recommended,
1616+ ts.configs.recommended,
1717+ svelte.configs.recommended,
1818+ prettier,
1919+ svelte.configs.prettier,
2020+ {
2121+ languageOptions: { globals: { ...globals.browser, ...globals.node } },
2222+ rules: {
2323+ // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
2424+ // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
2525+ 'no-undef': 'off'
2626+ }
2727+ },
2828+ {
2929+ files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
3030+ languageOptions: {
3131+ parserOptions: {
3232+ projectService: true,
3333+ extraFileExtensions: ['.svelte'],
3434+ parser: ts.parser,
3535+ svelteConfig
3636+ }
3737+ }
3838+ },
3939+ {
4040+ // Override or add rule settings here, such as:
4141+ // 'svelte/button-has-type': 'error'
4242+ rules: {}
4343+ }
4444+);
···11+# allow crawling everything by default
22+User-agent: *
33+Disallow:
playground/style.css
playground-orig/style.css
+17
playground/svelte.config.js
···11+import adapter from '@sveltejs/adapter-auto';
22+33+/** @type {import('@sveltejs/kit').Config} */
44+const config = {
55+ compilerOptions: {
66+ // Force runes mode for the project, except for libraries. Can be removed in svelte 6.
77+ runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true)
88+ },
99+ kit: {
1010+ // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
1111+ // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
1212+ // See https://svelte.dev/docs/kit/adapters for more information about adapters.
1313+ adapter: adapter()
1414+ }
1515+};
1616+1717+export default config;
+20
playground/tsconfig.json
···11+{
22+ "extends": "./.svelte-kit/tsconfig.json",
33+ "compilerOptions": {
44+ "rewriteRelativeImportExtensions": true,
55+ "allowJs": true,
66+ "checkJs": true,
77+ "esModuleInterop": true,
88+ "forceConsistentCasingInFileNames": true,
99+ "resolveJsonModule": true,
1010+ "skipLibCheck": true,
1111+ "sourceMap": true,
1212+ "strict": true,
1313+ "moduleResolution": "bundler"
1414+ }
1515+ // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
1616+ // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
1717+ //
1818+ // To make changes to top-level options such as include and exclude, we recommend extending
1919+ // the generated config; see https://svelte.dev/docs/kit/configuration#typescript
2020+}