Umstellung von Node.js auf Bun V1.0.0
Bun v1.0.0 ist vor einigen Tagen rausgekommen und bietet weitreichende Verbesserungen in Punkto Entwickler-Freundlichkeit und Geschwindigkeit beim Ausführen von Skripten, daher stellen wir nun alle Projekte auf Bun um.
This commit is contained in:
3
.github/workflows/cd.yml
vendored
3
.github/workflows/cd.yml
vendored
@@ -22,5 +22,6 @@ jobs:
|
|||||||
git clean -f -d
|
git clean -f -d
|
||||||
git pull origin main
|
git pull origin main
|
||||||
git status
|
git status
|
||||||
pnpm install
|
npm install -g bun
|
||||||
|
bun install
|
||||||
bash build.sh
|
bash build.sh
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -18,6 +18,7 @@ pnpm-debug.log*
|
|||||||
|
|
||||||
# lockfile
|
# lockfile
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
|
bun.lockb
|
||||||
|
|
||||||
# environment variables
|
# environment variables
|
||||||
.env
|
.env
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
FROM node:19.8-alpine3.16
|
FROM oven/bun
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
RUN npm i -g pnpm
|
|
||||||
|
|
||||||
WORKDIR /online-energieausweis
|
WORKDIR /online-energieausweis
|
||||||
COPY ./package.json ./
|
COPY ./package.json ./
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pnpm install --prod
|
RUN bun install --prod
|
||||||
|
|
||||||
CMD ["pnpm", "run", "build:production"]
|
CMD ["bun", "run", "build:production"]
|
||||||
@@ -3,7 +3,7 @@ services:
|
|||||||
online-energieausweis:
|
online-energieausweis:
|
||||||
build: ./
|
build: ./
|
||||||
container_name: online-energieausweis
|
container_name: online-energieausweis
|
||||||
command: pnpm run dev --host
|
command: bun run dev --host
|
||||||
links:
|
links:
|
||||||
- database
|
- database
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
10
package.json
10
package.json
@@ -4,15 +4,15 @@
|
|||||||
"license": "GPL V3.0",
|
"license": "GPL V3.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "bun --bun astro dev",
|
||||||
"build": "astro build",
|
"build": "bun --bun astro build",
|
||||||
"preview": "astro preview",
|
"preview": "bun --bun astro preview",
|
||||||
"astro": "astro",
|
"astro": "astro",
|
||||||
"test:e2e": "cypress run",
|
"test:e2e": "cypress run",
|
||||||
"test:unit": "vitest",
|
"test:unit": "vitest",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"build:production": "astro build && node server.js",
|
"build:production": "astro build && bun --bun server.js",
|
||||||
"i18n:generate": "npx astro-i18next generate"
|
"i18n:generate": "bunx astro-i18next generate"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
Reference in New Issue
Block a user