Update pnpm package management usage

This commit is contained in:
Tw93
2025-08-14 11:41:05 +08:00
parent 256cdc77ee
commit 81eae9627a
4 changed files with 44 additions and 17 deletions

View File

@@ -33,10 +33,11 @@ RUN --mount=type=cache,target=/var/cache/apt \
libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \
gnome-video-effects
# Install Node.js 20.x
# Install Node.js 20.x and pnpm
RUN --mount=type=cache,target=/var/cache/apt \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get update && apt-get install -y nodejs
apt-get update && apt-get install -y nodejs && \
npm install -g pnpm
# Copy project files
COPY . /pake
@@ -48,9 +49,9 @@ COPY --from=cargo-builder /cargo-cache/git /usr/local/cargo/git
COPY --from=cargo-builder /cargo-cache/registry /usr/local/cargo/registry
# Install dependencies and build pake-cli
RUN --mount=type=cache,target=/root/.npm \
npm install && \
npm run cli:build
RUN --mount=type=cache,target=/root/.pnpm \
pnpm install --frozen-lockfile && \
pnpm run cli:build
# Set up the entrypoint
WORKDIR /output