Skip to content

Commit 60342cf

Browse files
committed
initial commit
0 parents  commit 60342cf

Some content is hidden

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

43 files changed

+7286
-0
lines changed

.changes/config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"gitSiteUrl": "https://www.github.com/tauri-apps/tauri-plugin-window-state/",
3+
"pkgManagers": {
4+
"rust": {
5+
"version": true,
6+
"publish": true,
7+
"getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -"
8+
}
9+
},
10+
"packages": {
11+
"tauri-plugin-window-state": {
12+
"path": ".",
13+
"manager": "rust"
14+
}
15+
}
16+
}

.changes/readme.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changes
2+
##### via https://github.com/jbolda/covector
3+
4+
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 it represents the overall change for our sanity.
5+
6+
When you select the version bump required, you do *not* need to consider depedencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.
7+
8+
Use the following format:
9+
```md
10+
---
11+
"tauri-log-plugin": minor
12+
---
13+
14+
Change summary goes here
15+
16+
```

.github/workflows/audit.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Audit
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- "**/Cargo.lock"
11+
- "**/Cargo.toml"
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- "**/Cargo.lock"
17+
- "**/Cargo.toml"
18+
19+
jobs:
20+
audit:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions-rs/audit-check@v1
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/covector-status.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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@v2
10+
with:
11+
fetch-depth: 0
12+
- name: covector status
13+
uses: jbolda/covector/packages/action@covector-v0
14+
with:
15+
command: 'status'
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: covector version or publish
2+
on:
3+
push:
4+
branches:
5+
- dev
6+
7+
jobs:
8+
covector:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
registry-url: 'https://registry.npmjs.org'
19+
- name: git config
20+
run: |
21+
git config --global user.name "${{ github.event.pusher.name }}"
22+
git config --global user.email "${{ github.event.pusher.email }}"
23+
- name: covector version-or-publish
24+
uses: jbolda/covector/packages/action@covector-v0
25+
id: covector
26+
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
command: 'version-or-publish'
29+
createRelease: true
30+
- name: create pull request
31+
id: cpr
32+
uses: tauri-apps/create-pull-request@v2.8.0
33+
with:
34+
title: "Publish New Versions"
35+
labels: "version updates"
36+
branch: "release"
37+
body: ${{ steps.covector.outputs.change }}

.github/workflows/format.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Format
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
- dev
11+
12+
jobs:
13+
format:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Install rustfmt with nightly toolchain
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
profile: minimal
24+
toolchain: nightly
25+
override: true
26+
components: rustfmt
27+
- uses: actions-rs/cargo@v1
28+
with:
29+
command: fmt
30+
args: --manifest-path=Cargo.toml --all -- --check

.github/workflows/lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Clippy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
- dev
11+
12+
jobs:
13+
clippy:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: install webkit2gtk
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y webkit2gtk-4.0
24+
- name: Install clippy with stable toolchain
25+
uses: actions-rs/toolchain@v1
26+
with:
27+
profile: minimal
28+
toolchain: stable
29+
override: true
30+
components: clippy
31+
- uses: actions-rs/clippy-check@v1
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
args: --manifest-path=Cargo.toml --all-targets --all-features -- -D warnings
35+
name: clippy

.github/workflows/test.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
- dev
11+
paths-ignore:
12+
- 'webview-src/**'
13+
- 'webview-dist/**'
14+
- 'examples/**'
15+
16+
jobs:
17+
build-and-test:
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest, macos-latest, windows-latest]
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Install stable toolchain
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: stable
31+
override: true
32+
33+
- name: Install gtk on Ubuntu
34+
if: matrix.os == 'ubuntu-latest'
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y webkit2gtk-4.0
38+
- name: Get current date
39+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
40+
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
41+
42+
- name: Get current date
43+
if: matrix.os == 'windows-latest'
44+
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
45+
46+
- name: Cache cargo registry
47+
uses: actions/cache@v2
48+
with:
49+
path: ~/.cargo/registry
50+
# Add date to the cache to keep it up to date
51+
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
52+
# Restore from outdated cache for speed
53+
restore-keys: |
54+
${{ matrix.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
55+
56+
- name: Cache cargo index
57+
uses: actions/cache@v2
58+
with:
59+
path: ~/.cargo/git
60+
# Add date to the cache to keep it up to date
61+
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
62+
# Restore from outdated cache for speed
63+
restore-keys: |
64+
${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
65+
66+
- name: Cache cargo target
67+
uses: actions/cache@v2
68+
with:
69+
path: ${{ matrix.project}}/target
70+
# Add date to the cache to keep it up to date
71+
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
72+
# Restore from outdated cache for speed
73+
restore-keys: |
74+
${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
75+
76+
- name: Run tests
77+
uses: actions-rs/cargo@v1
78+
with:
79+
command: test
80+
args: --manifest-path=Cargo.toml --release

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
/Cargo.lock

Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "tauri-plugin-window-state"
3+
version = "0.1.0"
4+
authors = [ "Tauri Programme within The Commons Conservancy" ]
5+
edition = "2018"
6+
7+
[dependencies]
8+
tauri = { git = "https://github.com/tauri-apps/tauri/", branch = "next" }
9+
serde = "1.0"
10+
serde_json = "1.0"
11+
bincode = "1.3"

0 commit comments

Comments
 (0)