From 9ede361b25cb5b5acb62a5fd3d221f51e4ac20e9 Mon Sep 17 00:00:00 2001 From: michioxd Date: Sun, 14 Apr 2024 11:16:18 +0700 Subject: [PATCH] switch to `pnpm` --- .github/workflows/release.yml | 7 ++++--- guide/build.md | 2 +- guide/developing-ui.md | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5815ee7..216fd5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,9 +28,10 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - - run: cd ui && npm ci - - run: cd ui && npm run build - - run: cd ui && npm run test + - run: npm i -g pnpm + - run: cd ui && pnpm i --frozen-lockfile + - run: cd ui && pnpm run build + - run: cd ui && pnpm run test # Upload the UI and changelog as *job* artifacts (not *release* artifacts), used below. - uses: actions/upload-artifact@v3 with: diff --git a/guide/build.md b/guide/build.md index c38c561..5bc8647 100644 --- a/guide/build.md +++ b/guide/build.md @@ -95,7 +95,7 @@ $ cd .. $ sudo rsync --recursive --delete --chmod=D755,F644 ui/dist/ /usr/local/lib/moonfire-nvr/ui ``` -You can use `npm` instead if you don't want to use `pnpm`. +For more information about using `pnpm`, check out the [Developing UI Guide](./developing-ui.md#requirements). If you wish to bundle the UI into the binary, you can build the UI first and then pass `--features=bundled-ui` when building the server. See also the diff --git a/guide/developing-ui.md b/guide/developing-ui.md index 666d35b..a27936d 100644 --- a/guide/developing-ui.md +++ b/guide/developing-ui.md @@ -23,9 +23,10 @@ this in the webpack documentation. ## Requirements * Node.js v18+ -* `npm` or `pnpm` installed +* `pnpm` installed -This guide below will use [`pnpm`](https://pnpm.io/) as package manager instead `npm`. But you can still use `npm`. We highly recommended you to switch to `pnpm`. +This guide below will use [`pnpm`](https://pnpm.io/) as package manager instead +`npm`. So we highly recommended you to use `pnpm` in this project. ## Getting started