mirror of
https://github.com/ow-mods/ow-mod-man.git
synced 2025-12-11 20:15:50 +01:00
[META] Remove all references of pnpm
This commit is contained in:
parent
98a445729b
commit
c59de9cc5b
24
.github/workflows/nightly_build.yml
vendored
24
.github/workflows/nightly_build.yml
vendored
@ -43,32 +43,12 @@ jobs:
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||
key: ${{ matrix.platform }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-pnpm-store-
|
||||
|
||||
- name: Install Frontend Dependencies
|
||||
working-directory: owmods_gui/frontend
|
||||
run: pnpm install
|
||||
run: npm install
|
||||
|
||||
- name: Install Tauri CLI
|
||||
run: pnpm add -g @tauri-apps/cli
|
||||
run: npm add -g @tauri-apps/cli
|
||||
|
||||
- name: Build GUI
|
||||
run: tauri build --ci -b $([[ ${{ matrix.platform }} = 'windows-latest' ]] && echo 'msi nsis' || echo 'appimage deb')
|
||||
|
||||
22
.github/workflows/release_gui.yml
vendored
22
.github/workflows/release_gui.yml
vendored
@ -38,29 +38,9 @@ jobs:
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||
key: ${{ matrix.platform }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ matrix.platform }}-pnpm-store-
|
||||
|
||||
- name: Install Frontend Dependencies
|
||||
working-directory: owmods_gui/frontend
|
||||
run: pnpm install
|
||||
run: npm install
|
||||
|
||||
- name: Build GUI
|
||||
uses: tauri-apps/tauri-action@dev
|
||||
|
||||
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -12,7 +12,7 @@
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}/owmods_gui/frontend",
|
||||
"command": "pnpm dev"
|
||||
"command": "npm run dev"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ I tried to automate this process in a way that makes sense but it still needs so
|
||||
3. `owmods_gui/backend/Cargo.toml` - **also update the reference to owmods_core if it was updated**
|
||||
4. `nix/owmods-cli.nix`
|
||||
5. `nix/owmods-gui.nix`
|
||||
6. `owmods_gui/frontend/package.json` - used by `pnpm2nix` to generate a derivation for the frontend
|
||||
6. `owmods_gui/frontend/package.json`
|
||||
7. `xtask/Cargo.toml` - not the end of the world if you don't update this, determines the version shown in man pages for the CLI
|
||||
2. Merge `dev` to `main` (assuming you have a PR going)
|
||||
3. Run the "Create Core Release" action
|
||||
|
||||
@ -9,7 +9,6 @@ pkgs.mkShell {
|
||||
rustfmt
|
||||
nodejs
|
||||
openssl
|
||||
nodePackages.pnpm
|
||||
gcc
|
||||
webkitgtk
|
||||
glib-networking
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# Contributing
|
||||
|
||||
To build this project you'll need rust, cargo, and pnpm.
|
||||
To build this project you'll need rust, cargo, and node/npm.
|
||||
|
||||
This package is called `owmods_gui` so anytime you want to perform cargo commands on it **do not do it in this folder**, do it from the root of the repo and add `-p owmods_gui` to your cargo command.
|
||||
|
||||
Ex: `cargo add tokio` should become `cargo add clap -p owmods_gui`.
|
||||
Ex: `cargo add tokio` should become `cargo add tokio -p owmods_gui`.
|
||||
|
||||
## Setup on Linux
|
||||
|
||||
@ -18,9 +18,9 @@ Run the `shell.nix` file. Allow insecure is needed for OpenSSL 1.1.1 support.
|
||||
NIX_ALLOW_INSECURE=1 nix-shell shell.nix --impure
|
||||
```
|
||||
|
||||
## pnpm
|
||||
## npm
|
||||
|
||||
The frontend for this package is made with TS so you need to install related dependencies. First cd in to `owmods_gui/frontend`, then run `pnpm i`
|
||||
The frontend for this package is made with TS so you need to install related dependencies. First cd in to `owmods_gui/frontend`, then run `npm i`
|
||||
|
||||
## Typeshare
|
||||
|
||||
@ -32,11 +32,11 @@ To do this, you need to install the typeshare cli:
|
||||
cargo install typeshare-cli
|
||||
```
|
||||
|
||||
Then run the `gen-types` pnpm command:
|
||||
Then run the `gen-types` npm command:
|
||||
|
||||
```sh
|
||||
cd owmods_gui/frontend
|
||||
pnpm gen-types
|
||||
npm run gen-types
|
||||
```
|
||||
|
||||
This will generate `types.d.ts` in `owmods_gui/frontend/src/types.d.ts`.
|
||||
@ -54,8 +54,8 @@ And lint and format the frontend as well:
|
||||
|
||||
```sh
|
||||
cd owmods_gui/frontend
|
||||
pnpm lint
|
||||
pnpm prettify
|
||||
npm run lint
|
||||
npm run prettify
|
||||
```
|
||||
|
||||
Git hooks are setup to run clippy on every commit, meaning they may take longer.
|
||||
@ -71,7 +71,7 @@ This is a result of your OS falsely thinking the dev version of the manager shou
|
||||
Events are used to communicate between the frontend and backend. They are defined in `owmods_gui/src/events.rs`.
|
||||
The events are then synced via typeshare to the frontend, where they are defined in `owmods_gui/frontend/src/types.d.ts`.
|
||||
|
||||
To use an event, you must first define it in `owmods_gui/src/events.rs` and then sync it to the frontend by running `pnpm gen-types` in `owmods_gui/frontend`.
|
||||
To use an event, you must first define it in `owmods_gui/src/events.rs` and then sync it to the frontend by running `npm gen-types` in `owmods_gui/frontend`.
|
||||
|
||||
Then, you can use the event in the frontend by importing `emit` or `listen` from `owmods_gui/frontend/events.ts` and using it like so:
|
||||
|
||||
|
||||
@ -36,7 +36,8 @@ Prerequisites:
|
||||
|
||||
- rust
|
||||
- cargo
|
||||
- pnpm
|
||||
- node
|
||||
- npm
|
||||
|
||||
You'll need the tauri CLI installed, so run:
|
||||
|
||||
@ -53,7 +54,7 @@ git clone https://github.com/ow-mods/ow-mod-man/
|
||||
Go into `owmods_gui/frontend` and run:
|
||||
|
||||
```sh
|
||||
pnpm i
|
||||
npm i
|
||||
```
|
||||
|
||||
To install dependencies, then go back to the root of the repo.
|
||||
|
||||
@ -3,4 +3,5 @@ src-tauri/target
|
||||
stats.html
|
||||
!.vscode
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
src/tests/TODO.md
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user