chore: use bun instead of pnpm as package manager

This commit is contained in:
kunish 2024-02-01 18:12:04 +08:00
parent b3d920df00
commit eb6944fb2a
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
10 changed files with 16 additions and 6790 deletions

View File

@ -1,10 +1,5 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: daily
- package-ecosystem: docker
directory: /
schedule:

View File

@ -27,20 +27,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: latest
- uses: oven-sh/setup-bun@v1
- name: install dependencies
run: pnpm install
run: bun install
- name: build
run: pnpm build
run: bun run build
- name: publish gh-pages
uses: peaceiris/actions-gh-pages@v3

View File

@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm commitlint -e
bunx commitlint -e

View File

@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm lint-staged
bunx lint-staged

View File

@ -1,3 +1,2 @@
dist
CHANGELOG.md
pnpm-lock.yaml

View File

@ -1,13 +1,11 @@
FROM docker.io/node:alpine as builder
FROM docker.io/oven/bun:alpine as builder
WORKDIR /build
COPY . .
RUN corepack enable
RUN corepack prepare pnpm@latest --activate
RUN pnpm install
RUN pnpm build
RUN bun install
RUN bun run build
FROM docker.io/caddy:alpine

View File

@ -109,19 +109,19 @@ docker compose pull && docker compose up -d
> Install npm dependencies
```shell
pnpm install
bun install
```
> Build artifacts
```shell
pnpm build
bun run build
```
> Serve static files
```shell
pnpm serve
bun run serve
```
## Credits

BIN
bun.lockb Executable file

Binary file not shown.

View File

@ -9,7 +9,7 @@
"dev": "vite",
"format": "prettier -w .",
"lint": "eslint --fix .",
"prepare": "husky install",
"prepare": "husky",
"pwa-assets-generator": "pwa-assets-generator",
"serve": "vite preview"
},
@ -37,7 +37,7 @@
"@thisbeyond/solid-dnd": "^0.7.5",
"@types/byte-size": "^8.1.2",
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.12",
"@types/node": "^20.11.15",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
@ -51,10 +51,10 @@
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^8.0.3",
"husky": "^9.0.7",
"is-ip": "^5.0.1",
"ky": "^1.2.0",
"lint-staged": "^15.2.0",
"lint-staged": "^15.2.1",
"lodash": "^4.17.21",
"match-sorter": "^6.3.3",
"prettier": "^3.2.4",
@ -69,7 +69,7 @@
"typescript": "^5.3.3",
"uuid": "^9.0.1",
"vite": "^5.0.12",
"vite-plugin-pwa": "^0.17.4",
"vite-plugin-pwa": "^0.17.5",
"vite-plugin-solid": "^2.9.1",
"zod": "^3.22.4"
}

File diff suppressed because it is too large Load Diff