Skip to content

Commit

Permalink
Switch from npm to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Sep 22, 2024
1 parent e4a867b commit 4d794d3
Show file tree
Hide file tree
Showing 8 changed files with 5,881 additions and 4,750 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
os:
- ubuntu-latest
- windows-latest
node-version:
- 22.x

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -29,15 +31,6 @@ jobs:
~/.cargo/git
./src-tauri/target
- name: 🍃 Install Node.js
uses: actions/setup-node@v2
with:
node-version: 18

- name: 🍃 Install Yarn
run: |
npm i -g npm yarn
- name: 🦀 Install Rust
uses: actions-rs/toolchain@v1
with: { toolchain: stable }
Expand All @@ -53,31 +46,39 @@ jobs:
sudo apt-get update
sudo apt-get upgrade -y --no-install-recommends -y libgtk-3-dev libgtksourceview-3.0-dev webkit2gtk-4.0 libappindicator3-dev webkit2gtk-driver xvfb
- uses: pnpm/action-setup@v4

- name: 🟢 Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: 🔌 Install Node.js dependencies
run: yarn install
run: pnpm install --frozen-lockfile

- name: 🔌 Download Rust dependencies
run: cargo fetch --manifest-path=src-tauri/Cargo.toml

- name: 🏗️ 📄 Build frontend
run: yarn build
run: pnpm run build

- name: 🏗️ 💽 Build application
run: yarn tauri build
run: pnpm run tauri build

- name: 🧪 Test application (linux)
if: matrix.os == 'ubuntu-latest'
continue-on-error: true
run: |
xvfb-run yarn test
xvfb-run pnpm run test
- name: 🧪 Test application (non-linux)
if: matrix.os != 'ubuntu-latest'
continue-on-error: true
run: |
yarn test
pnpm run test
- name: 🗃 Store artifacts (release only)
- name: 🗃 Store Linux artifacts (release only)
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest' && startsWith(github.ref, 'refs/tags/v')
with:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you want to use the in-development project, you can compile it by doing what

- [Rust](https://www.rust-lang.org/tools/install)
- [Node.js](https://nodejs.org/en/download/)
- [Yarn](https://yarnpkg.com/getting-started/install) (preferred by the Tauri team, so expect better compatibility)
- [pnpm](https://pnpm.io/fr/)
- For Linux users:
- Follow [this guide](https://tauri.studio/docs/getting-started/setting-up-linux#1-system-dependencies) to install the **system dependencies** that are mandatory.
- For Windows users:
Expand All @@ -38,21 +38,21 @@ If you want to use the in-development project, you can compile it by doing what
### Install

```
yarn install
pnpm install
```

> You do not need to install Rust dependencies, since running `cargo` commands like `cargo run` will automatically download and compile dependencies.
### Run the app in dev mode

```
yarn tauri dev
pnpm run tauri dev
```

### Compile for production

```
yarn tauri build
pnpm run tauri build
```

> This command builds the app in the `src-tauri/target/release/` directory.
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. src && eslint --ignore-path .gitignore src",
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. src",
"test": "yarn --cwd tests/webdriverio run test",
"test": "pnpm --cwd tests/webdriverio run test",
"tauri": "tauri",
"postinstall": "yarn --cwd tests/webdriverio/"
"postinstall": "pnpm install --dir tests/webdriverio/"
},
"devDependencies": {
"@popperjs/core": "^2.11.7",
Expand Down Expand Up @@ -49,6 +49,7 @@
"typescript": "^5.0.4",
"vite": "^4.5.5"
},
"packageManager": "[email protected]",
"type": "module",
"dependencies": {
"emoji-regex": "^10.3.0",
Expand Down
Loading

0 comments on commit 4d794d3

Please sign in to comment.