Skip to content

Commit

Permalink
vinvoor: switch from yarn to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Topvennie committed Oct 27, 2024
1 parent 718a32f commit 3b443ce
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 2,549 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vingo/target

vinvoor/bin
vinvoor/dist
vinvoor/node_modules
4 changes: 2 additions & 2 deletions .githooks/vinvoor_format_lint
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

cd vinvoor/

yarn run format
pnpm run format

if [ $? -ne 0 ]; then
echo "Error: code improperly formatted!"
exit 1
fi

yarn run lint
pnpm run lint

if [ $? -ne 0 ]; then
echo "Error: code improperly linted!"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/vinvoor_format_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
with:
node-version: 20.15.1

- name: Install yarn
run: npm install -g yarn
- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: yarn install
run: pnpm install
working-directory: vinvoor/

- name: Run formatter
run: yarn prettier --check .
run: pnpm prettier --check .
working-directory: vinvoor/

- name: Run Linter
run: yarn eslint . --max-warnings=0
run: pnpm eslint . --max-warnings=0
working-directory: vinvoor/
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ RUN apk add upx musl-dev

WORKDIR /

COPY vingo/Cargo.* .
COPY vingo/Cargo.* ./

COPY vingo/migration migration
COPY vingo/migration migration/

COPY vingo/src src
COPY vingo/src src/

RUN cargo build --release

Expand All @@ -20,17 +20,19 @@ FROM node:20.15.1-alpine3.20 as build_frontend

WORKDIR /

RUN npm install -g pnpm

COPY vinvoor/package.json package.json

COPY vinvoor/yarn.lock yarn.lock
COPY vinvoor/pnpm-lock.yaml pnpm-lock.yaml

RUN yarn install
RUN pnpm install

COPY vinvoor/ .
COPY vinvoor/ ./

COPY vinvoor/production.env .env

RUN yarn run build
RUN pnpm run build

# End container
FROM alpine:3.20
Expand Down
Empty file added vingo/.dockerignore
Empty file.
6 changes: 4 additions & 2 deletions vinvoor/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM node:20.15.1-alpine3.20

WORKDIR /frontend

COPY package.json yarn.lock ./
RUN npm install -g pnpm

CMD yarn install && yarn run host
COPY package.json pnpm-lock.yaml ./

CMD pnpm install && pnpm run host
11 changes: 10 additions & 1 deletion vinvoor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build": "tsc && vite build",
"format": "prettier . --write",
"lint": "eslint . --fix",
"preview": "vite preview"
"preview": "vite preview",
"postinstall": "if [ \"$CI\" != \"true\" ]; then pnpx simple-git-hooks; else echo 'Skipping Git hooks in CI'; fi"
},
"dependencies": {
"@emotion/react": "^11.13.3",
Expand Down Expand Up @@ -50,9 +51,17 @@
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.14",
"prettier": "3.3.3",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.6.3",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.10",
"vite-plugin-svgr": "^4.2.0"
},
"simple-git-hooks": {
"pre-commit": "cd ui && pnpm lint-staged"
},
"lint-staged": {
"*": "eslint . && prettier .",
"src/*": "bash -c tsc --noEmit"
}
}
12 changes: 12 additions & 0 deletions vinvoor/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3b443ce

Please sign in to comment.