Skip to content

Commit f1f47dc

Browse files
committed
Initial commit
0 parents  commit f1f47dc

34 files changed

+17241
-0
lines changed

.github/workflows/build.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install system dependencies
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
20+
21+
- name: Setup Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: lts/*
25+
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v4
28+
with:
29+
version: latest
30+
31+
- name: Install Rust stable
32+
uses: dtolnay/rust-toolchain@stable
33+
with:
34+
components: clippy
35+
36+
- name: Rust cache
37+
uses: swatinem/rust-cache@v2
38+
with:
39+
workspaces: './src-tauri -> target'
40+
41+
- name: Install frontend dependencies
42+
run: pnpm install
43+
44+
- name: ESLint
45+
run: pnpm lint
46+
47+
- name: Prettier
48+
run: pnpm format --check
49+
50+
- name: Clippy
51+
working-directory: src-tauri
52+
run: cargo clippy -- -D warnings
53+
54+
build:
55+
needs: lint
56+
permissions:
57+
contents: write
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
include:
62+
- platform: windows-latest
63+
args: ''
64+
- platform: ubuntu-22.04
65+
args: ''
66+
- platform: macos-latest
67+
args: '--target aarch64-apple-darwin'
68+
- platform: macos-latest
69+
args: '--target x86_64-apple-darwin'
70+
71+
runs-on: ${{ matrix.platform }}
72+
73+
steps:
74+
- uses: actions/checkout@v4
75+
76+
- name: Install dependencies (Linux)
77+
if: matrix.platform == 'ubuntu-22.04'
78+
run: |
79+
sudo apt-get update
80+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
81+
82+
- name: Setup Node
83+
uses: actions/setup-node@v4
84+
with:
85+
node-version: lts/*
86+
87+
- name: Setup pnpm
88+
uses: pnpm/action-setup@v4
89+
with:
90+
version: latest
91+
92+
- name: Install Rust stable
93+
uses: dtolnay/rust-toolchain@stable
94+
with:
95+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
96+
97+
- name: Rust cache
98+
uses: swatinem/rust-cache@v2
99+
with:
100+
workspaces: './src-tauri -> target'
101+
102+
- name: Install frontend dependencies
103+
run: pnpm install
104+
105+
- name: Build
106+
uses: tauri-apps/tauri-action@v0
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
with:
110+
args: ${{ matrix.args }}
111+
112+
- name: Upload artifacts
113+
uses: actions/upload-artifact@v4
114+
with:
115+
name: sprout-${{ matrix.platform }}${{ matrix.args && '-' || '' }}${{ matrix.args && 'intel' || '' }}
116+
path: |
117+
src-tauri/target/release/bundle/**/*.msi
118+
src-tauri/target/release/bundle/**/*.exe
119+
src-tauri/target/release/bundle/**/*.AppImage
120+
src-tauri/target/release/bundle/**/*.deb
121+
src-tauri/target/release/bundle/**/*.dmg
122+
src-tauri/target/*/release/bundle/**/*.dmg
123+
if-no-files-found: ignore

.github/workflows/release.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- platform: windows-latest
17+
args: ''
18+
- platform: ubuntu-22.04
19+
args: ''
20+
- platform: macos-latest
21+
args: '--target aarch64-apple-darwin'
22+
- platform: macos-latest
23+
args: '--target x86_64-apple-darwin'
24+
25+
runs-on: ${{ matrix.platform }}
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install dependencies (Linux)
31+
if: matrix.platform == 'ubuntu-22.04'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
35+
36+
- name: Setup Node
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: lts/*
40+
41+
- name: Setup pnpm
42+
uses: pnpm/action-setup@v4
43+
with:
44+
version: latest
45+
46+
- name: Install Rust stable
47+
uses: dtolnay/rust-toolchain@stable
48+
with:
49+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
50+
51+
- name: Rust cache
52+
uses: swatinem/rust-cache@v2
53+
with:
54+
workspaces: './src-tauri -> target'
55+
56+
- name: Install frontend dependencies
57+
run: pnpm install
58+
59+
- name: Build and release
60+
uses: tauri-apps/tauri-action@v0
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
with:
64+
tagName: ${{ github.ref_name }}
65+
releaseName: 'Sprout ${{ github.ref_name }}'
66+
releaseBody: 'See the assets to download and install Sprout.'
67+
releaseDraft: true
68+
prerelease: false
69+
args: ${{ matrix.args }}

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
src-tauri/target/
7+
8+
# Editor
9+
.vscode/
10+
.idea/
11+
*.swp
12+
*.swo
13+
14+
# OS
15+
.DS_Store
16+
Thumbs.db
17+
18+
# Environment
19+
.env
20+
.env.*
21+
22+
# Logs
23+
*.log

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"vueIndentScriptAndStyle": false,
8+
"endOfLine": "auto"
9+
}

eslint.config.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import js from '@eslint/js';
2+
import typescript from '@typescript-eslint/eslint-plugin';
3+
import tsParser from '@typescript-eslint/parser';
4+
import vue from 'eslint-plugin-vue';
5+
import prettier from 'eslint-plugin-prettier/recommended';
6+
import vueParser from 'vue-eslint-parser';
7+
8+
export default [
9+
js.configs.recommended,
10+
...vue.configs['flat/recommended'],
11+
prettier,
12+
{
13+
files: ['**/*.{js,ts,vue}'],
14+
languageOptions: {
15+
parser: vueParser,
16+
parserOptions: {
17+
parser: tsParser,
18+
ecmaVersion: 'latest',
19+
sourceType: 'module',
20+
},
21+
globals: {
22+
console: 'readonly',
23+
window: 'readonly',
24+
document: 'readonly',
25+
navigator: 'readonly',
26+
crypto: 'readonly',
27+
setTimeout: 'readonly',
28+
clearInterval: 'readonly',
29+
setInterval: 'readonly',
30+
confirm: 'readonly',
31+
URLSearchParams: 'readonly',
32+
DragEvent: 'readonly',
33+
HTMLElement: 'readonly',
34+
},
35+
},
36+
plugins: {
37+
'@typescript-eslint': typescript,
38+
},
39+
rules: {
40+
'vue/multi-word-component-names': 'off',
41+
'vue/no-v-html': 'off',
42+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
43+
'no-unused-vars': 'off',
44+
'prettier/prettier': 'warn',
45+
},
46+
},
47+
{
48+
ignores: ['dist/**', 'node_modules/**', 'src-tauri/**'],
49+
},
50+
];

index.html

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="/pumpkin.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Sprout</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "pumpkin-panel",
3+
"version": "0.1.0",
4+
"type": "module",
5+
"description": "Sprout - Server management panel for Pumpkin",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vue-tsc --noEmit && vite build",
9+
"preview": "vite preview",
10+
"tauri": "tauri",
11+
"lint": "eslint src",
12+
"lint:fix": "eslint src --fix",
13+
"format": "prettier --write src"
14+
},
15+
"dependencies": {
16+
"@fortawesome/fontawesome-svg-core": "^7.1.0",
17+
"@fortawesome/free-brands-svg-icons": "^7.1.0",
18+
"@fortawesome/vue-fontawesome": "^3.1.3",
19+
"@tauri-apps/api": "^2.10.1",
20+
"@tauri-apps/plugin-dialog": "^2.6.0",
21+
"@tauri-apps/plugin-shell": "^2.3.5",
22+
"vue": "^3.5.27",
23+
"vue-router": "^5.0.2"
24+
},
25+
"devDependencies": {
26+
"@eslint/js": "^9.39.2",
27+
"@tauri-apps/cli": "^2.10.0",
28+
"@typescript-eslint/eslint-plugin": "^8.54.0",
29+
"@typescript-eslint/parser": "^8.54.0",
30+
"@vitejs/plugin-vue": "^6.0.4",
31+
"eslint": "^9.39.2",
32+
"eslint-config-prettier": "^10.1.8",
33+
"eslint-plugin-prettier": "^5.5.5",
34+
"eslint-plugin-vue": "^10.7.0",
35+
"prettier": "^3.8.1",
36+
"typescript": "^5.9.3",
37+
"vite": "^7.3.1",
38+
"vue-eslint-parser": "^10.2.0",
39+
"vue-tsc": "^3.2.4"
40+
}
41+
}

0 commit comments

Comments
 (0)