mirror of
https://github.com/Dvorinka/excalidraw-full.git
synced 2026-06-03 22:02:57 +00:00
更新项目配置与构建流程
本次提交包含以下主要更改: 1. 更新 `.gitignore` 文件,移除对子目录环境变量文件的忽略。 2. 修改 `excalidraw-complete.Dockerfile`,将构建工具从 `npm` 更改为 `pnpm`,并移除不必要的补丁步骤。 3. 更新 GitHub Actions 工作流 `docker-build.yml`,移除对子模块的递归检出。 4. 修改 `excalidraw/.env.production` 文件,调整后端 API 地址为本地开发环境,并更新 Firebase 配置。 5. 移除 `husky` 相关依赖及配置,简化项目依赖。 这些更改旨在优化开发环境配置,提高构建效率,并简化项目依赖管理。
This commit is contained in:
@@ -20,8 +20,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Log in to Container Registry
|
- name: Log in to Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
|
|||||||
@@ -7,4 +7,3 @@ excalidraw-complete
|
|||||||
node_modules
|
node_modules
|
||||||
.env
|
.env
|
||||||
*.env
|
*.env
|
||||||
*/*.env
|
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
# 前端构建阶段
|
# 前端构建阶段
|
||||||
FROM node:18 AS frontend-builder
|
FROM node:18 AS frontend-builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# 安装 patch 工具
|
|
||||||
RUN apt-get update && apt-get install -y patch
|
|
||||||
# 复制 excalidraw 子模块
|
# 复制 excalidraw 子模块
|
||||||
COPY excalidraw/ ./excalidraw/
|
COPY excalidraw/ ./excalidraw/
|
||||||
# 复制补丁文件
|
|
||||||
COPY frontend.patch ./
|
|
||||||
# 应用前端补丁
|
|
||||||
RUN cd excalidraw && patch -p1 < ../frontend.patch
|
|
||||||
# 构建前端
|
# 构建前端
|
||||||
RUN cd excalidraw && npm install && cd excalidraw-app && npm run build:app:docker
|
RUN cd excalidraw && pnpm install && cd excalidraw-app && pnpm build:app:docker
|
||||||
|
|
||||||
# 后端构建阶段
|
# 后端构建阶段
|
||||||
FROM golang:alpine AS backend-builder
|
FROM golang:alpine AS backend-builder
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
VITE_APP_BACKEND_V2_GET_URL=https://json.excalidraw.com/api/v2/
|
VITE_APP_BACKEND_V2_GET_URL=http://localhost:3002/api/v2/
|
||||||
VITE_APP_BACKEND_V2_POST_URL=https://json.excalidraw.com/api/v2/post/
|
VITE_APP_BACKEND_V2_POST_URL=http://localhost:3002/api/v2/post/
|
||||||
|
|
||||||
VITE_APP_LIBRARY_URL=https://libraries.excalidraw.com
|
VITE_APP_LIBRARY_URL=https://libraries.excalidraw.com
|
||||||
VITE_APP_LIBRARY_BACKEND=https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries
|
VITE_APP_LIBRARY_BACKEND=http://localhost:3002/libraries
|
||||||
|
|
||||||
VITE_APP_PLUS_LP=https://plus.excalidraw.com
|
VITE_APP_PLUS_LP=http://localhost:3002/plus/
|
||||||
VITE_APP_PLUS_APP=https://app.excalidraw.com
|
VITE_APP_PLUS_APP=http://localhost:3002/app/
|
||||||
|
|
||||||
VITE_APP_AI_BACKEND=https://oss-ai.excalidraw.com
|
VITE_APP_AI_BACKEND=http://localhost:3002/ai/
|
||||||
|
|
||||||
# socket server URL used for collaboration
|
# socket server URL used for collaboration
|
||||||
VITE_APP_WS_SERVER_URL=https://oss-collab.excalidraw.com
|
VITE_APP_WS_SERVER_URL=http://localhost:3002
|
||||||
|
|
||||||
VITE_APP_FIREBASE_CONFIG='{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}'
|
VITE_APP_FIREBASE_CONFIG='{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"","databaseURL":"","projectId":"excalidraw-room-persistence","storageBucket":"","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}'
|
||||||
|
|
||||||
VITE_APP_DISABLE_TRACKING=
|
VITE_APP_DISABLE_TRACKING=yes
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# yarn lint-staged
|
|
||||||
@@ -39,7 +39,6 @@
|
|||||||
"eslint-config-react-app": "7.0.1",
|
"eslint-config-react-app": "7.0.1",
|
||||||
"eslint-plugin-prettier": "3.3.1",
|
"eslint-plugin-prettier": "3.3.1",
|
||||||
"http-server": "14.1.1",
|
"http-server": "14.1.1",
|
||||||
"husky": "7.0.4",
|
|
||||||
"jsdom": "22.1.0",
|
"jsdom": "22.1.0",
|
||||||
"lint-staged": "12.3.7",
|
"lint-staged": "12.3.7",
|
||||||
"pepjs": "0.5.3",
|
"pepjs": "0.5.3",
|
||||||
@@ -70,7 +69,6 @@
|
|||||||
"fix": "pnpm fix:other && pnpm fix:code",
|
"fix": "pnpm fix:other && pnpm fix:code",
|
||||||
"locales-coverage": "node scripts/build-locales-coverage.js",
|
"locales-coverage": "node scripts/build-locales-coverage.js",
|
||||||
"locales-coverage:description": "node scripts/locales-coverage-description.js",
|
"locales-coverage:description": "node scripts/locales-coverage-description.js",
|
||||||
"prepare": "husky install",
|
|
||||||
"prettier": "prettier \"**/*.{css,scss,json,md,html,yml}\" --ignore-path=.eslintignore",
|
"prettier": "prettier \"**/*.{css,scss,json,md,html,yml}\" --ignore-path=.eslintignore",
|
||||||
"start": "pnpm --filter excalidraw-app start",
|
"start": "pnpm --filter excalidraw-app start",
|
||||||
"start:app:production": "pnpm build && npx http-server build -a localhost -p 5001 -o",
|
"start:app:production": "pnpm build && npx http-server build -a localhost -p 5001 -o",
|
||||||
|
|||||||
Generated
-10
@@ -93,9 +93,6 @@ importers:
|
|||||||
http-server:
|
http-server:
|
||||||
specifier: 14.1.1
|
specifier: 14.1.1
|
||||||
version: 14.1.1
|
version: 14.1.1
|
||||||
husky:
|
|
||||||
specifier: 7.0.4
|
|
||||||
version: 7.0.4
|
|
||||||
jsdom:
|
jsdom:
|
||||||
specifier: 22.1.0
|
specifier: 22.1.0
|
||||||
version: 22.1.0
|
version: 22.1.0
|
||||||
@@ -4419,11 +4416,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==}
|
resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==}
|
||||||
engines: {node: '>=16.17.0'}
|
engines: {node: '>=16.17.0'}
|
||||||
|
|
||||||
husky@7.0.4:
|
|
||||||
resolution: {integrity: sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==}
|
|
||||||
engines: {node: '>=12'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
i18next-browser-languagedetector@6.1.4:
|
i18next-browser-languagedetector@6.1.4:
|
||||||
resolution: {integrity: sha512-wukWnFeU7rKIWT66VU5i8I+3Zc4wReGcuDK2+kuFhtoxBRGWGdvYI9UQmqNL/yQH1KogWwh+xGEaIPH8V/i2Zg==}
|
resolution: {integrity: sha512-wukWnFeU7rKIWT66VU5i8I+3Zc4wReGcuDK2+kuFhtoxBRGWGdvYI9UQmqNL/yQH1KogWwh+xGEaIPH8V/i2Zg==}
|
||||||
|
|
||||||
@@ -12647,8 +12639,6 @@ snapshots:
|
|||||||
|
|
||||||
human-signals@5.0.0: {}
|
human-signals@5.0.0: {}
|
||||||
|
|
||||||
husky@7.0.4: {}
|
|
||||||
|
|
||||||
i18next-browser-languagedetector@6.1.4:
|
i18next-browser-languagedetector@6.1.4:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime': 7.27.6
|
'@babel/runtime': 7.27.6
|
||||||
|
|||||||
Reference in New Issue
Block a user