Switch package manager to pnpm

pull/772/head
Bastien Wirtz 2024-04-22 19:55:25 +02:00
parent 8326eba25f
commit 0740fb31b5
8 changed files with 4455 additions and 4015 deletions

View File

@ -23,16 +23,20 @@ jobs:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
-
name: pnpm setup
uses: pnpm/action-setup@v3
with:
version: 8
- -
name: Use Node.js ${{ matrix.node-version }} name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'yarn' cache: 'pnpm'
- -
name: install dependencies name: install dependencies
run: yarn install --frozen-lockfile --non-interactive run: pnpm install --frozen-lockfile
- -
name: Check code style & potentential issues name: Check code style & potentential issues
run: yarn lint run: pnpm lint

View File

@ -13,11 +13,22 @@ jobs:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
-
name: pnpm setup
uses: pnpm/action-setup@v3
with:
version: 8
-
name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- -
name: Build project name: Build project
run: | run: |
yarn install --frozen-lockfile --non-interactive pnpm install --frozen-lockfile
yarn build pnpm build
- -
name: Create artifact name: Create artifact
working-directory: "dist" working-directory: "dist"

View File

@ -1,16 +1,21 @@
# build stage # build stage
FROM node:lts-alpine3.18 as build-stage FROM node:lts-alpine3.19 as build-stage
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN corepack use pnpm@8
WORKDIR /app WORKDIR /app
COPY package.json ./ COPY package.json pnpm-lock.yaml ./
RUN yarn install --no-cache --frozen-lockfile --non-interactive RUN pnpm install --frozen-lockfile
COPY . . COPY . .
RUN yarn build RUN pnpm build
# production stage # production stage
FROM alpine:3.18 FROM alpine:3.19
ENV GID 1000 ENV GID 1000
ENV UID 1000 ENV UID 1000

View File

@ -143,13 +143,8 @@ helm install homer djjudas21/homer -f values.yaml
### Build manually ### Build manually
```sh ```sh
# Using yarn (recommended) pnpm install
yarn install pnpm build
yarn build
# **OR** Using npm
npm install
npm run build
``` ```
Then your dashboard is ready to use in the `/dist` directory. Then your dashboard is ready to use in the `/dist` directory.

View File

@ -3,13 +3,8 @@
If you want to contribute to Homer, please read the [contributing guidelines](https://github.com/bastienwirtz/homer/blob/main/CONTRIBUTING.md) first. If you want to contribute to Homer, please read the [contributing guidelines](https://github.com/bastienwirtz/homer/blob/main/CONTRIBUTING.md) first.
```sh ```sh
# Using yarn (recommended) pnpm install
yarn install pnpm dev
yarn dev
# **OR** Using npm
npm install
npm run dev
``` ```
## Custom services ## Custom services

View File

@ -6,7 +6,7 @@ The principle is simple: save a sample output of the API used in the service in
## Start the mock server to expose dummy data ## Start the mock server to expose dummy data
```sh ```sh
yarn mock pnpm mock
``` ```
## How to add a new services sample ## How to add a new services sample

4419
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

3989
yarn.lock

File diff suppressed because it is too large Load Diff