Skip to content

Commit 2cac716

Browse files
committed
feat: update deps & implement basic ci/cd config
1 parent dc91293 commit 2cac716

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+714
-1069
lines changed

.github/renovate.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"extends": ["config:recommended", "group:all", "schedule:weekly", ":widenPeerDependencies"],
3+
"enabledManagers": ["cargo", "github-actions", "npm"],
4+
"packageRules": [
5+
{
6+
"matchUpdateTypes": ["patch"],
7+
"enabled": false
8+
},
9+
{
10+
"matchManagers": ["cargo"],
11+
"automerge": true,
12+
"minimumReleaseAge": "2 days"
13+
},
14+
{
15+
"matchManagers": ["bun"],
16+
"automerge": true,
17+
"minimumReleaseAge": "2 days"
18+
}
19+
],
20+
"timezone": "America/Sao_Paulo",
21+
"dependencyDashboard": true
22+
}

.github/workflows/release.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: 'publish'
2+
3+
on:
4+
push:
5+
tags:
6+
- v*.*.*
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: release-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
publish-tauri:
15+
permissions:
16+
contents: write
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- platform: 'macos-latest'
22+
args: '--target aarch64-apple-darwin'
23+
# Uncomment for Intel builds
24+
# - platform: 'macos-latest' # for Intel based macs.
25+
# args: '--target x86_64-apple-darwin'
26+
- platform: 'ubuntu-24.04'
27+
args: ''
28+
- platform: 'windows-latest'
29+
args: ''
30+
31+
runs-on: ${{ matrix.platform }}
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Setup Bun
36+
uses: oven-sh/setup-bun@v2
37+
with:
38+
bun-version: latest
39+
- run: bun i
40+
41+
- name: install Rust stable
42+
uses: dtolnay/rust-toolchain@stable
43+
with:
44+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
45+
46+
- name: install dependencies (ubuntu only)
47+
if: matrix.platform == 'ubuntu-24.04'
48+
run: |
49+
sudo apt-get update
50+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
51+
52+
- name: Build Tauri
53+
uses: tauri-apps/tauri-action@v0
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
with:
57+
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
58+
releaseName: 'v__VERSION__'
59+
releaseBody: 'See [CHANGES.md](https://github.com/alysonhower/tauri2-svelte5-shadcn/blob/main/CHANGES.md) for a complete list of changes.'
60+
releaseDraft: true
61+
prerelease: false
62+
args: ${{ matrix.args }}

.github/workflows/test-build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'src/**'
9+
- 'src-tauri/**'
10+
- 'tests/**'
11+
- 'bun.lockb'
12+
- 'src-tauri/Cargo.lock'
13+
- '.github/workflows/test-build.yml'
14+
pull_request:
15+
workflow_dispatch:
16+
17+
concurrency:
18+
group: build-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build-tauri:
23+
permissions:
24+
contents: write
25+
strategy:
26+
fail-fast: true
27+
28+
runs-on: 'ubuntu-24.04'
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Setup Bun
33+
uses: oven-sh/setup-bun@v2
34+
with:
35+
bun-version: latest
36+
- run: bun i
37+
38+
- name: install Rust stable
39+
uses: dtolnay/rust-toolchain@stable
40+
41+
- name: install dependencies
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
45+
46+
- name: Build Tauri
47+
run: bun tauri build

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ Thumbs.db
1919
# Vite
2020
vite.config.js.timestamp-*
2121
vite.config.ts.timestamp-*
22+
23+
# Tauri
24+
/src-tauri/target

.prettierrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"singleQuote": true,
44
"trailingComma": "none",
55
"printWidth": 100,
6-
"plugins": ["prettier-plugin-svelte"],
6+
"plugins": [
7+
"prettier-plugin-svelte"
8+
],
79
"overrides": [
810
{
911
"files": "*.svelte",

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"rust-lang.rust-analyzer",
4+
"tauri-apps.tauri-vscode",
5+
"svelte.svelte-vscode",
6+
"bradlc.vscode-tailwindcss",
7+
"esbenp.prettier-vscode"
8+
]
9+
}

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## 1.0.0 (2024-11-15)
4+
5+
- Feat: implement basic ci/cd config

README.md

Lines changed: 23 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,39 @@
1-
# Tauri 2 + Svelte 5 + Shadcn Boilerplate
1+
# Tauri 2 Svelte 5 Boilerplate
2+
Simple boilerplate for Tauri 2 with Svelte 5 (and shadcn-svelte) using Bun runtime.
23

3-
[![Tauri 2.0](https://img.shields.io/badge/Tauri-2.0-blue)](https://tauri.app/)
4-
[![Svelte 5](https://img.shields.io/badge/Svelte-5.0-orange)](https://svelte.dev/)
5-
[![Bun](https://img.shields.io/badge/Bun-ts-pink)](https://bun.sh/)
6-
[![shadcn-svelte](https://img.shields.io/badge/UI-shadcn--svelte-purple)](https://www.shadcn-svelte.com/)
4+
## Requirements
5+
In order to run this boilerplate, you need to install Bun and Rust. If you are on Windows I also recommend installing MSVC before the other dependencies (make sure to check the "Desktop development with C++" workload).
76

8-
A modern, feature-rich boilerplate for building cross-platform desktop applications using Tauri 2, Svelte 5, and shadcn-svelte components. This template provides a solid foundation for developing performant desktop applications with a beautiful UI.
7+
Some useful links:
8+
- https://bun.sh/docs/installation
9+
- https://www.rust-lang.org/tools/install
10+
- https://visualstudio.microsoft.com/vs/community/
911

10-
## ✨ Features
11-
12-
- 🚀 **Tauri 2.0** - Build smaller, faster, and more secure desktop applications
13-
- 🎯 **Svelte 5** - Cybernetically enhanced web apps with runes
14-
- 💅 **shadcn-svelte** - Beautiful and accessible UI components
15-
- 🎨 **TailwindCSS** - Utility-first CSS framework
16-
- 📦 **Bun** - Fast JavaScript runtime and package manager
17-
- 🔧 **TypeScript** - Type-safe development
18-
- 🎭 **Pre-configured development environment**
19-
20-
## 🚀 Getting Started
21-
22-
### Prerequisites
23-
24-
Before you begin, ensure you have the following installed:
25-
26-
1. **Bun** - [Bun installation](https://bun.sh/docs/installation)
27-
2. **Rust** - [Rust installation](https://www.rust-lang.org/tools/install)
28-
3. **For Windows Users:**
29-
- Install [Visual Studio Community](https://visualstudio.microsoft.com/vs/community/)
30-
- During installation, select "Desktop development with C++" workload
31-
32-
### Installation
33-
34-
1. Clone the repository:
35-
```bash
36-
git clone https://github.com/alysonhower/tauri2-svelte5-shadcn.git
12+
## Setup
3713
```
38-
39-
2. Navigate to the project directory:
40-
```bash
14+
git clone https://github.com/alysonhower/tauri2-svelte5-shadcn.git
4115
cd tauri2-svelte5-shadcn
16+
bun i
4217
```
43-
44-
3. Install dependencies:
45-
```bash
46-
bun install
18+
## Useful commands
19+
### Start dev server
4720
```
48-
49-
## 🛠️ Development
50-
51-
### Start Development Server
52-
```bash
5321
bun run tauri dev
5422
```
5523

56-
### Build Production Release
57-
```bash
58-
bun run tauri build
59-
```
60-
61-
### Code Formatting
62-
```bash
63-
bun run format
24+
### Build executable
6425
```
65-
66-
### Adding UI Components
67-
To add shadcn components (e.g., button):
68-
```bash
69-
bunx shadcn-svelte@latest add button
26+
bun run tauri build
7027
```
7128

72-
## 📚 Usefull Links
73-
74-
- [Svelte 5](https://svelte.dev/)
75-
- [Tauri 2](https://tauri.app/start/)
76-
- [TailwindCSS](https://tailwindcss.com/)
77-
- [Shadcn-svelte](https://next.shadcn-svelte.com/)
78-
79-
## 🤝 Contributing
80-
81-
Contributions are welcome! Feel free to:
82-
83-
1. Fork the repository
84-
2. Create a feature branch
85-
3. Submit a Pull Request
29+
## Other links
30+
### Svelte 5
31+
https://svelte.dev/docs
8632

87-
Please ensure your PR follows the project's coding standards and includes appropriate tests.
33+
### Tauri 2
34+
https://tauri.app/start/
8835

89-
## ⚠️ Platform Support
36+
### shadcn-svelte
37+
https://next.shadcn-svelte.com/
9038

91-
Currently tested and verified on:
92-
- ✅ Windows 11
39+
Note: Boilerplate tested on Windows 11 only.

bun.lockb

2.63 KB
Binary file not shown.

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"style": "default",
44
"tailwind": {
55
"config": "tailwind.config.ts",
6-
"css": "src/app.css",
6+
"css": "src\\app.css",
77
"baseColor": "slate"
88
},
99
"aliases": {

0 commit comments

Comments
 (0)