Skip to content

Commit 0b09cc1

Browse files
authored
feat: add Sveltekit templates (#200)
* feat: πŸ”₯ initial Sveltekit JS template * feat: πŸ“ add to readme * feat: πŸ”₯ initial Sveltekit TS template * fix: 🎨 use a middle dash in name? * feat: ⚑️ register the templates * style: ✨ pnpm format * fix: ✨ match the other boilerplates * fix: πŸ› add changes * fix: ⚑️ simplify routes - Remove unused route group - Should fix the CI - Closer to the barebones SK template. * fix: πŸš‘οΈ apply feedbacks from @amrbashir * fix: ⚑️ enable CSR * fix: ⚑️ move to end of lists * fix: 🎨 remove template comments * fix: 🎨 missed edits * favicon.png -> svelte.png * readme
1 parent dcc3db2 commit 0b09cc1

37 files changed

Lines changed: 476 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"create-tauri-app": minor
3+
"create-tauri-app-js": minor
4+
---
5+
6+
Add `svelte-kit` and `svelte-kit-ts` template.

β€Ž.scripts/generate-templates-matrix.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const nodeJsTemplates = [
1717
"preact",
1818
"preact-ts",
1919
"clojurescript",
20+
"svelte-kit",
21+
"svelte-kit-ts",
2022
];
2123

2224
const matrixConfig = [

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ Currently supported template presets include:
9292
- `preact-ts`
9393
- `angular`
9494
- `clojurescript`
95+
- `svelte-kit`
96+
- `svelte-kit-ts`
9597

9698
You can use `.` for the project name to scaffold in the current directory.
9799

1.53 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"svelte.svelte-vscode",
4+
"tauri-apps.tauri-vscode",
5+
"rust-lang.rust-analyzer"
6+
]
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Svelte-Kit + Vite
2+
3+
This template should help get you started developing with Tauri and Svelte-Kit in Vite.
4+
5+
## Recommended IDE Setup
6+
7+
[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer).
8+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
2+
# SPDX-License-Identifier: Apache-2.0
3+
# SPDX-License-Identifier: MIT
4+
5+
beforeDevCommand = {{pkg_manager_run_command}} dev
6+
beforeBuildCommand = {{pkg_manager_run_command}} build
7+
devPath = http://localhost:1420
8+
distDir = ../build
9+
10+
[files]
11+
vite.svg = static/vite.svg
12+
tauri.svg = static/tauri.svg
13+
svelte.svg = static/svelte.svg
14+
style.css = src/app.css
15+
svelte.png = static/favicon.png
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
/build
27+
/.svelte-kit
28+
/package
29+
.env
30+
.env.*
31+
!.env.example
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "{{package_name}}",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite dev",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
11+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
12+
"tauri": "tauri"
13+
},
14+
"dependencies": {
15+
"@tauri-apps/api": "^1.1.0"
16+
},
17+
"devDependencies": {
18+
"@sveltejs/kit": "next",
19+
"@sveltejs/adapter-static": "next",
20+
"svelte": "^3.49.0",
21+
"svelte-check": "^2.7.1",
22+
"svelte-preprocess": "^4.10.6",
23+
"@tauri-apps/cli": "^1.1.0",
24+
"tslib": "^2.3.1",
25+
"typescript": "^4.8.4",
26+
"vite": "^3.1.0"
27+
}
28+
}

0 commit comments

Comments
Β (0)