Skip to content

Commit

Permalink
update: add tauri+vue
Browse files Browse the repository at this point in the history
  • Loading branch information
hhstore committed Oct 10, 2022
1 parent 2a12592 commit 744961a
Show file tree
Hide file tree
Showing 53 changed files with 4,423 additions and 0 deletions.
55 changes: 55 additions & 0 deletions crates/rs-tauri-vue/.eslintrc-auto-import.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"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,
"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 crates/rs-tauri-vue/.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 crates/rs-tauri-vue/.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 crates/rs-tauri-vue/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release

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/[email protected]
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 crates/rs-tauri-vue/.github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build

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/[email protected]
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 crates/rs-tauri-vue/.github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

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/[email protected]
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 crates/rs-tauri-vue/.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
37 changes: 37 additions & 0 deletions crates/rs-tauri-vue/CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Changelog

## 0.3.0 (2022-09-29)

- Feat: added debug config for VSCode. Thanks @gabriel-andreescu for the contribution!
- Feat: added vue-devtools integration.
- Feat: open browser devtools automatically on start.
- Feat: changed app icon to Vue icon.
- Feat: added `RUST_BACKTRACE=1` to the default dev command.
- Fix: added empty dist folder to make Rust extension happy.
- Fix: fixed Vite build target to match tauri create app config.
- UI: smarter styles and markup.
- Docs: documented howto implement Electron-like `titleBarStyle: 'hidden'` window, and that the sync backend commands block the UI.
- Chore: bumped deps.

## 0.2.0 (2022-07-10)

- Fix: changed app name (`packageName` in `src-tauri/tauri.conf.json`).
- Fix: made Vite config more robust.
- Tooling: added `.vscode` and recommendation fot Volar extension.
- Refactor: removed `vite-plugin-tauri` from frontend deps.
- Chore: tweaked Vite config for better dev experience.
- Chore: bumped deps.
- Docs: better README.

## 0.1.0 (2022-06-16)

Hello Tauri 1.0!

- Feat: Added a separate release workflow.
- Refactor: converted menu to use `Menu::os_default`. Thank You to @JonasKruckenberg for the tip!
- Docs: added more docs on usage, fixed prerequisites link.
- Chore: Bumped all Vite + Tauri deps.

## 0.0.1 (2022-04-27)

- Initial version
3 changes: 3 additions & 0 deletions crates/rs-tauri-vue/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code of Conduct

This repo adheres to [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
21 changes: 21 additions & 0 deletions crates/rs-tauri-vue/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Ville Säävuori

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 744961a

Please sign in to comment.