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:
Moritz Utcke
2023-09-12 12:33:17 +06:00
parent dd943a3108
commit 471f3bae8d
5 changed files with 12 additions and 11 deletions

View File

@@ -22,5 +22,6 @@ jobs:
git clean -f -d
git pull origin main
git status
pnpm install
npm install -g bun
bun install
bash build.sh

1
.gitignore vendored
View File

@@ -18,6 +18,7 @@ pnpm-debug.log*
# lockfile
pnpm-lock.yaml
bun.lockb
# environment variables
.env

View File

@@ -1,11 +1,10 @@
FROM node:19.8-alpine3.16
FROM oven/bun
EXPOSE 3000
RUN npm i -g pnpm
WORKDIR /online-energieausweis
COPY ./package.json ./
COPY . .
RUN pnpm install --prod
RUN bun install --prod
CMD ["pnpm", "run", "build:production"]
CMD ["bun", "run", "build:production"]

View File

@@ -3,7 +3,7 @@ services:
online-energieausweis:
build: ./
container_name: online-energieausweis
command: pnpm run dev --host
command: bun run dev --host
links:
- database
environment:

View File

@@ -4,15 +4,15 @@
"license": "GPL V3.0",
"type": "module",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"dev": "bun --bun astro dev",
"build": "bun --bun astro build",
"preview": "bun --bun astro preview",
"astro": "astro",
"test:e2e": "cypress run",
"test:unit": "vitest",
"format": "prettier --write .",
"build:production": "astro build && node server.js",
"i18n:generate": "npx astro-i18next generate"
"build:production": "astro build && bun --bun server.js",
"i18n:generate": "bunx astro-i18next generate"
},
"private": true,
"dependencies": {