Skip to content

Commit fa5720f

Browse files
committed
feat: initial commit
0 parents  commit fa5720f

Some content is hidden

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

48 files changed

+9114
-0
lines changed

Diff for: .changes/config.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"gitSiteUrl": "https://github.com/swpu-acm/algohub.git/",
3+
"changeTags": {
4+
"feat": "New Features",
5+
"fix": "Bug Fixes",
6+
"perf": "Performance Improvements",
7+
"chore": "Chores",
8+
"refactor": "Refactors"
9+
},
10+
"packages": {
11+
"algohub": {
12+
"path": "./src-tauri",
13+
"publish": "echo 'Ignored publish to registries."
14+
}
15+
}
16+
}

Diff for: .changes/readme.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Changes
2+
3+
> via <https://github.com/jbolda/covector>
4+
5+
As you create PRs and make changes that require a version bump, please add a new markdown file in this folder. You do not note the version _number_, but rather the type of bump that you expect: major, minor, or patch. The filename is not important, as long as it is a `.md`, but we recommend that it represents the overall change for organizational purposes.
6+
7+
When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.
8+
9+
Use the following format:
10+
11+
```md
12+
---
13+
"package-a": patch
14+
"package-b": minor
15+
---
16+
17+
Change summary goes here
18+
```
19+
20+
Summaries do not have a specific character limit, but are text only. These summaries are used within the (future implementation of) changelogs. They will give context to the change and also point back to the original PR if more details and context are needed.
21+
22+
Changes will be designated as a `major`, `minor` or `patch` as further described in [semver](https://semver.org/).
23+
24+
Given a version number MAJOR.MINOR.PATCH, increment the:
25+
26+
- MAJOR version when you make incompatible API changes,
27+
- MINOR version when you add functionality in a backwards compatible manner, and
28+
- PATCH version when you make backwards compatible bug fixes.
29+
30+
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra steps will be necessary in consideration of merging and publishing).

Diff for: .cspell.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"words": [
3+
"algohub",
4+
"primevue",
5+
"SWPU",
6+
"tailwindcss",
7+
"toastservice",
8+
"usetoast"
9+
]
10+
}

Diff for: .github/workflows/covector-status.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Covector status
2+
on: [pull_request]
3+
4+
jobs:
5+
covector:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
fetch-depth: 0 # required for use of git history
12+
- name: covector status
13+
uses: jbolda/covector/packages/[email protected]
14+
id: covector
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
command: 'status'
18+
comment: true

Diff for: .github/workflows/covector-version-or-publish.yml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Version or publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
# required for npm provenance
10+
id-token: write
11+
# required to create the GitHub Release
12+
contents: write
13+
# required for creating the Version Packages Release
14+
pull-requests: write
15+
16+
jobs:
17+
version-or-publish:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 65
20+
outputs:
21+
change: ${{ steps.covector.outputs.change }}
22+
commandRan: ${{ steps.covector.outputs.commandRan }}
23+
releaseId: ${{ steps.covector.outputs.releaseId }}
24+
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0 # required for use of git history
30+
- uses: actions/setup-node@v4
31+
with:
32+
registry-url: "https://registry.npmjs.org"
33+
- name: git config
34+
run: |
35+
git config --global user.name "${{ github.event.pusher.name }}"
36+
git config --global user.email "${{ github.event.pusher.email }}"
37+
- name: covector version or publish (publish when no change files present)
38+
uses: jbolda/covector/packages/[email protected]
39+
id: covector
40+
with:
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
command: "version-or-publish"
43+
createRelease: true
44+
recognizeContributors: true
45+
- name: Create Pull Request With Versions Bumped
46+
id: cpr
47+
uses: peter-evans/create-pull-request@v6
48+
if: steps.covector.outputs.commandRan == 'version'
49+
with:
50+
title: "release: bump version"
51+
commit-message: "chore: publish new versions"
52+
labels: "version updates"
53+
branch: "release"
54+
body: ${{ steps.covector.outputs.change }}
55+
56+
release-tauri:
57+
needs: version-or-publish
58+
runs-on: ubuntu-latest
59+
if: needs.version-or-publish.outputs.successfulPublish == 'true'
60+
permissions:
61+
contents: write
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
include:
66+
- platform: "macos-latest" # for Arm based macs (M1 and above).
67+
args: "--target aarch64-apple-darwin"
68+
- platform: "macos-latest" # for Intel based macs.
69+
args: "--target x86_64-apple-darwin"
70+
- platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04.
71+
args: ""
72+
- platform: "windows-latest"
73+
args: ""
74+
steps:
75+
- uses: actions/checkout@v4
76+
- uses: actions/setup-node@v4
77+
with:
78+
node-version: lts/*
79+
- name: Install Rust stable
80+
uses: dtolnay/rust-toolchain@stable
81+
with:
82+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
83+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
84+
- name: Install dependencies (ubuntu only)
85+
if: matrix.platform == 'ubuntu-22.04'
86+
run: |
87+
sudo apt-get update
88+
sudo apt-get install -y libwebkit2gtk-4.1-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
89+
- name: Install frontend dependencies
90+
run: pnpm install
91+
- uses: tauri-apps/tauri-action@v0
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
with:
95+
releaseId: ${{ needs.version-or-publish.outputs.releaseId }}
96+
args: ${{ matrix.args }}

Diff for: .gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
# unplugin-vue-components
27+
components.d.ts

Diff for: .vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"Vue.volar",
4+
"tauri-apps.tauri-vscode",
5+
"rust-lang.rust-analyzer"
6+
]
7+
}

Diff for: README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Tauri + Vue + TypeScript
2+
3+
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4+
5+
## Recommended IDE Setup
6+
7+
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
8+
9+
## Type Support For `.vue` Imports in TS
10+
11+
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
12+
13+
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
14+
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
15+
16+
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).

Diff for: index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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>AlgoHub</title>
8+
</head>
9+
10+
<body>
11+
<div id="app"></div>
12+
<script type="module" src="/src/main.ts"></script>
13+
</body>
14+
</html>

Diff for: input.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

Diff for: package.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "algohub",
3+
"private": true,
4+
"version": "0.1.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vue-tsc --noEmit && vite build",
9+
"preview": "vite preview",
10+
"tauri": "tauri"
11+
},
12+
"dependencies": {
13+
"@primevue/forms": "^4.2.2",
14+
"@primevue/themes": "^4.2.2",
15+
"@tauri-apps/api": "^2",
16+
"@tauri-apps/plugin-shell": "^2",
17+
"axios": "^1.7.7",
18+
"primevue": "^4.2.2",
19+
"vue": "^3.3.4",
20+
"vue-router": "^4.4.5",
21+
"zod": "^3.23.8"
22+
},
23+
"devDependencies": {
24+
"@primevue/auto-import-resolver": "^4.2.2",
25+
"@tauri-apps/cli": "^2",
26+
"@types/node": "^22.9.0",
27+
"@vitejs/plugin-vue": "^5.0.5",
28+
"covector": "^0.12.3",
29+
"tailwindcss": "^3.4.15",
30+
"typescript": "^5.2.2",
31+
"unplugin-vue-components": "^0.27.4",
32+
"vite": "^5.3.1",
33+
"vue-tsc": "^2.0.22"
34+
}
35+
}

0 commit comments

Comments
 (0)