mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-15 19:22:26 +08:00
chore: test: use pnpm
This commit is contained in:
parent
575a14e1f3
commit
890f55c9dc
22
.github/workflows/dev.yaml
vendored
22
.github/workflows/dev.yaml
vendored
|
@ -34,14 +34,19 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
cache: "yarn"
|
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
name: Install pnpm
|
||||||
|
with:
|
||||||
|
version: 8
|
||||||
|
run_install: false
|
||||||
|
|
||||||
- name: Delete current release assets
|
- name: Delete current release assets
|
||||||
if: startsWith(matrix.os, 'ubuntu-')
|
if: startsWith(matrix.os, 'ubuntu-')
|
||||||
uses: mknejp/delete-release-assets@v1
|
uses: mknejp/delete-release-assets@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
tag: alpha
|
tag: dev
|
||||||
fail-if-no-assets: false
|
fail-if-no-assets: false
|
||||||
fail-if-no-release: false
|
fail-if-no-release: false
|
||||||
assets: |
|
assets: |
|
||||||
|
@ -59,10 +64,10 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl
|
||||||
|
|
||||||
- name: Yarn install and check
|
- name: Pnpm install and check
|
||||||
run: |
|
run: |
|
||||||
yarn install --network-timeout 1000000 --frozen-lockfile
|
pnpm i
|
||||||
yarn run check
|
pnpm check
|
||||||
|
|
||||||
- name: Tauri build
|
- name: Tauri build
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
|
@ -76,13 +81,14 @@ jobs:
|
||||||
releaseBody: "More new features are now supported."
|
releaseBody: "More new features are now supported."
|
||||||
releaseDraft: false
|
releaseDraft: false
|
||||||
prerelease: true
|
prerelease: true
|
||||||
|
tauriScript: pnpm
|
||||||
args: -f default-meta
|
args: -f default-meta
|
||||||
|
|
||||||
- name: Portable Bundle
|
- name: Portable Bundle
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
yarn build -f default-meta
|
pnpm build -f default-meta
|
||||||
yarn run portable
|
pnpm portable
|
||||||
env:
|
env:
|
||||||
TAG_NAME: dev
|
TAG_NAME: dev
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
yarn pretty-quick --staged
|
pnpm pretty-quick --staged
|
||||||
|
|
12
README.md
12
README.md
|
@ -36,31 +36,31 @@ open the terminal and run `sudo xattr -r -d com.apple.quarantine /Applications/C
|
||||||
You should install Rust and Nodejs, see [here](https://tauri.app/v1/guides/getting-started/prerequisites) for more details. Then install Nodejs packages.
|
You should install Rust and Nodejs, see [here](https://tauri.app/v1/guides/getting-started/prerequisites) for more details. Then install Nodejs packages.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn install
|
pnpm i
|
||||||
```
|
```
|
||||||
|
|
||||||
Then download the clash binary... Or you can download it from [clash premium release](https://github.com/Dreamacro/clash/releases/tag/premium) and rename it according to [tauri config](https://tauri.studio/docs/api/config/#tauri.bundle.externalBin).
|
Then download the clash binary... Or you can download it from [clash premium release](https://github.com/Dreamacro/clash/releases/tag/premium) and rename it according to [tauri config](https://tauri.studio/docs/api/config/#tauri.bundle.externalBin).
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# force update to latest version
|
# force update to latest version
|
||||||
# yarn run check --force
|
# pnpm run check --force
|
||||||
|
|
||||||
yarn run check
|
pnpm run check
|
||||||
```
|
```
|
||||||
|
|
||||||
Then run
|
Then run
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn dev
|
pnpm dev
|
||||||
|
|
||||||
# run it in another way if app instance exists
|
# run it in another way if app instance exists
|
||||||
yarn dev:diff
|
pnpm dev:diff
|
||||||
```
|
```
|
||||||
|
|
||||||
Or you can build it
|
Or you can build it
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn build
|
pnpm build
|
||||||
```
|
```
|
||||||
|
|
||||||
## Todos
|
## Todos
|
||||||
|
|
|
@ -51,7 +51,9 @@
|
||||||
"@types/js-cookie": "^3.0.2",
|
"@types/js-cookie": "^3.0.2",
|
||||||
"@types/lodash": "^4.14.180",
|
"@types/lodash": "^4.14.180",
|
||||||
"@types/lodash-es": "^4.17.7",
|
"@types/lodash-es": "^4.17.7",
|
||||||
|
"@types/react": "^18.2.37",
|
||||||
"@types/react-dom": "^18.0.11",
|
"@types/react-dom": "^18.0.11",
|
||||||
|
"@types/react-transition-group": "^4.4.9",
|
||||||
"@vitejs/plugin-react": "^4.1.0",
|
"@vitejs/plugin-react": "^4.1.0",
|
||||||
"adm-zip": "^0.5.9",
|
"adm-zip": "^0.5.9",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
|
3906
pnpm-lock.yaml
Normal file
3906
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -33,7 +33,7 @@ async function resolve() {
|
||||||
const { version } = require("../package.json");
|
const { version } = require("../package.json");
|
||||||
|
|
||||||
const tag = META ? "meta" : ALPHA ? "alpha" : `v${version}`;
|
const tag = META ? "meta" : ALPHA ? "alpha" : `v${version}`;
|
||||||
const buildCmd = META ? `yarn build -f default-meta` : `yarn build`;
|
const buildCmd = META ? `pnpm build -f default-meta` : `pnpm build`;
|
||||||
|
|
||||||
console.log(`[INFO]: Upload to tag "${tag}"`);
|
console.log(`[INFO]: Upload to tag "${tag}"`);
|
||||||
console.log(`[INFO]: Building app. "${buildCmd}"`);
|
console.log(`[INFO]: Building app. "${buildCmd}"`);
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
"build": {
|
"build": {
|
||||||
"distDir": "../dist",
|
"distDir": "../dist",
|
||||||
"devPath": "http://localhost:3000/",
|
"devPath": "http://localhost:3000/",
|
||||||
"beforeDevCommand": "yarn run web:dev",
|
"beforeDevCommand": "pnpm run web:dev",
|
||||||
"beforeBuildCommand": "yarn run web:build"
|
"beforeBuildCommand": "pnpm run web:build"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"systemTray": {
|
"systemTray": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user