Skip to content

Commit

Permalink
chore: 初始化提交
Browse files Browse the repository at this point in the history
  • Loading branch information
lly-ke committed Jan 18, 2023
0 parents commit 58c502c
Show file tree
Hide file tree
Showing 68 changed files with 9,319 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .eslintrc-auto-import.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"globals": {
"EffectScope": true,
"computed": true,
"createApp": true,
"customRef": true,
"defineAsyncComponent": true,
"defineComponent": true,
"effectScope": true,
"getCurrentInstance": true,
"getCurrentScope": true,
"h": true,
"inject": true,
"isProxy": true,
"isReactive": true,
"isReadonly": true,
"isRef": true,
"markRaw": true,
"nextTick": true,
"onActivated": true,
"onBeforeMount": true,
"onBeforeUnmount": true,
"onBeforeUpdate": true,
"onDeactivated": true,
"onErrorCaptured": true,
"onMounted": true,
"onRenderTracked": true,
"onRenderTriggered": true,
"onScopeDispose": true,
"onServerPrefetch": true,
"onUnmounted": true,
"onUpdated": true,
"provide": true,
"reactive": true,
"readonly": true,
"ref": true,
"resolveComponent": true,
"resolveDirective": true,
"shallowReactive": true,
"shallowReadonly": true,
"shallowRef": true,
"toRaw": true,
"toRef": true,
"toRefs": true,
"triggerRef": true,
"unref": true,
"useAttrs": true,
"useCssModule": true,
"useCssVars": true,
"useSlots": true,
"watch": true,
"watchEffect": true,
"watchPostEffect": true,
"watchSyncEffect": true
}
}
28 changes: 28 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/vue3-recommended',
'@vue/typescript/recommended',
'plugin:security/recommended',
'prettier',
'./.eslintrc-auto-import.json',
],
parserOptions: {
ecmaVersion: 2021,
},
rules: {
'no-var': 'error',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'comma-dangle': ['error', 'only-multiline'],
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
}
35 changes: 35 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"extends": [
"config:base",
"group:all",
"schedule:weekly"
],
"enabledManagers": [
"cargo",
"npm"
],
"packageRules": [
{
"updateTypes": [
"patch"
],
"enabled": false
},
{
"matchManagers": [
"cargo"
],
"stabilityDays": 2,
"prCreation": "not-pending"
},
{
"matchManagers": [
"npm"
],
"stabilityDays": 2,
"prCreation": "not-pending"
}
],
"timezone": "Europe/Helsinki",
"dependencyDashboard": true
}
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: 编译发布

on:
push:
tags:
- 'v*'
workflow_dispatch:

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true

jobs:
publish:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.1
with:
version: 7
run_install: true

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'pnpm'

- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: Build Vite + Tauri
run: pnpm build

- name: Create release
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'v__VERSION__'
releaseBody: 'See the assets to download and install this version.'
releaseDraft: true
prerelease: false
54 changes: 54 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 测试编译

on:
push:
branches:
- main
paths:
- 'src/**'
- 'src-tauri/**'
- 'tests/**'
- 'pnpm-lock.yaml'
- '.github/workflows/test.yml'
workflow_dispatch:

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
test-build:
strategy:
fail-fast: true
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3

- name: Install pnpm + deps
uses: pnpm/action-setup@v2.2.2
with:
version: 7
run_install: true

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'

- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: Build Vite + Tauri
run: pnpm build
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 测试

on:
push:
branches:
- main
paths:
- 'src/**'
- 'src-tauri/**'
- 'tests/**'
- 'pnpm-lock.yaml'
- '.github/workflows/test.yml'
pull_request:
paths:
- 'src/**'
- 'src-tauri/**'
- 'tests/**'
- 'pnpm-lock.yaml'
- '.github/workflows/test.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.1
with:
version: 7
run_install: true

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'pnpm'

- name: Run unit tests
run: pnpm test
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist/**
!dist/keep
dist-ssr
*.local

# Editor directories and files
.vscode/settings.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.vscode/settings.json
src-tauri/target

.env
LOCAL_NOTES.md
.gitpod.yml
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"Vue.volar",
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer",
"vadimcn.vscode-lldb"
]
}
Loading

0 comments on commit 58c502c

Please sign in to comment.