Skip to content

Commit 574f5ad

Browse files
authored
copy svelte example from vercel/vercel (#1035)
1 parent d1ec1f3 commit 574f5ad

File tree

16 files changed

+1111
-0
lines changed

16 files changed

+1111
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
.env
16+
.env.local
17+
.env.build
18+
19+
.vercel
20+
21+
# Editor directories and files
22+
.vscode/*
23+
!.vscode/extensions.json
24+
.idea
25+
.DS_Store
26+
*.suo
27+
*.ntvs*
28+
*.njsproj
29+
*.sln
30+
*.sw?
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Svelte
2+
3+
This directory is a brief example of a [Svelte](https://svelte.dev/) site that can be deployed to Vercel with zero-configuration. If you need to use API Routes, we recommend using our [SvelteKit example](https://github.com/vercel/vercel/tree/main/examples/sveltekit).
4+
5+
## Deploy Your Own
6+
7+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/framework-boilerplates/svelte&template=svelte)
8+
9+
_Live Example: https://svelte.vercel.app_
10+
11+
## Getting Started
12+
13+
```bash
14+
npm create vite@latest my-svelte-project
15+
cd my-svelte-project
16+
npm install
17+
npm run dev
18+
```
19+
20+
## Need an official Svelte framework?
21+
22+
Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploys seamlessly to Vercel, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + Svelte + TS</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "vite-project",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json"
11+
},
12+
"devDependencies": {
13+
"@sveltejs/vite-plugin-svelte": "^5.0.0",
14+
"@tsconfig/svelte": "^5.0.4",
15+
"svelte": "^5.2.7",
16+
"svelte-check": "^4.1.0",
17+
"tslib": "^2.8.1",
18+
"typescript": "~5.6.2",
19+
"vite": "^6.0.1"
20+
}
21+
}

0 commit comments

Comments
 (0)