Add excalidraw as submodule

This commit is contained in:
patwie
2024-03-29 13:53:53 +00:00
parent 31c8029402
commit 3893dfb13e
5 changed files with 31 additions and 7 deletions
+3
View File
@@ -0,0 +1,3 @@
[submodule "excalidraw"]
path = excalidraw
url = https://github.com/excalidraw/excalidraw.git
+9 -3
View File
@@ -41,11 +41,17 @@ Interested in contributing or customizing? Build Excalidraw Complete from source
```bash ```bash
# Clone and prepare the Excalidraw frontend # Clone and prepare the Excalidraw frontend
git clone https://github.com/excalidraw/excalidraw.git git clone https://github.com/PatWie/excalidraw-complete.git --recursive
cd excalidraw cd excalidraw
git checkout tags/v0.17.3 # git checkout tags/v0.17.3
# Fix docker build
git remote add jcobol https://github.com/jcobol/excalidraw
git fetch jcobol
git checkout 7582_fix_docker_build
git apply ../frontend.patch git apply ../frontend.patch
# Follow build instructions to compile assets into the frontend directory cd ../
docker build -t exalidraw-ui-build excalidraw -f ui-build.Dockerfile
docker run -v ${PWD}/:/pwd/ -it exalidraw-ui-build cp -r /frontend /pwd
``` ```
Compile the Go application: Compile the Go application:
Submodule
+1
Submodule excalidraw added at 37ad34c4c2
+6 -4
View File
@@ -22,12 +22,13 @@ import (
type ( type (
UserToFollow struct { UserToFollow struct {
SocketId string SocketId string `json:"socketId"`
Username string Username string `json:"username"`
} }
OnUserFollowedPayload struct { OnUserFollowedPayload struct {
UserToFollow UserToFollow UserToFollow UserToFollow `json:"userToFollow"`
action string Action string `json:"action"` // "FOLLOW" | "UNFOLLOW"
} }
) )
@@ -72,6 +73,7 @@ func setupSocketIO() *socketio.Server {
Credentials: true, Credentials: true,
}) })
ioo := socketio.NewServer(nil, opts) ioo := socketio.NewServer(nil, opts)
ioo.On("connection", func(clients ...any) { ioo.On("connection", func(clients ...any) {
socket := clients[0].(*socketio.Socket) socket := clients[0].(*socketio.Socket)
ioo.To(socketio.Room(socket.Id())).Emit("init-room") ioo.To(socketio.Room(socket.Id())).Emit("init-room")
+12
View File
@@ -0,0 +1,12 @@
FROM node:18 AS build
WORKDIR /home/node/app
COPY . .
RUN npm install
RUN cd excalidraw-app && npm run build:app:docker
FROM ubuntu:20.04
COPY --from=build /home/node/app/excalidraw-app/build /frontend