update docker file

This commit is contained in:
smfahim25 2025-03-20 11:58:26 +06:00
parent 5cc945be6b
commit acb8103ba6
3 changed files with 9 additions and 15 deletions

View file

@ -1,10 +1,6 @@
# Build stage # Build stage
FROM node:22-alpine AS builder FROM node:22-alpine AS builder
WORKDIR /app WORKDIR /app
# Install dependencies for fabric.js
RUN apk add --no-cache python3 make g++ pixman cairo pango jpeg-dev
COPY package.json package-lock.json ./ COPY package.json package-lock.json ./
RUN npm ci RUN npm ci
COPY . . COPY . .

View file

@ -1,4 +1,3 @@
import { Button } from "../ui/Button";
import { X } from "lucide-react"; import { X } from "lucide-react";
import { ScrollArea } from "../ui/scroll-area"; import { ScrollArea } from "../ui/scroll-area";
import { useContext, useEffect, useRef, useState } from "react"; import { useContext, useEffect, useRef, useState } from "react";
@ -8,6 +7,7 @@ import { fabric } from "fabric";
import CommonPanel from "./CommonPanel"; import CommonPanel from "./CommonPanel";
import useProject from "@/hooks/useProject"; import useProject from "@/hooks/useProject";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { Button } from "../ui/button";
export default function TextPanel() { export default function TextPanel() {
const { canvas, setSelectedPanel } = useContext(CanvasContext); const { canvas, setSelectedPanel } = useContext(CanvasContext);
@ -20,7 +20,8 @@ export default function TextPanel() {
function isUUID(value) { function isUUID(value) {
if (typeof value !== "string") return false; if (typeof value !== "string") return false;
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; const uuidRegex =
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
return uuidRegex.test(value); return uuidRegex.test(value);
} }
@ -62,7 +63,7 @@ export default function TextPanel() {
setActiveObject(text); setActiveObject(text);
canvas.renderAll(); canvas.renderAll();
const object = canvas.toJSON(['id', 'selectable']); const object = canvas.toJSON(["id", "selectable"]);
const updateData = { ...projectData?.data, object }; const updateData = { ...projectData?.data, object };
// Wait for the project update before continuing // Wait for the project update before continuing
projectUpdate({ id, updateData }); projectUpdate({ id, updateData });

View file

@ -1,6 +1,6 @@
import { defineConfig } from 'vite' import { defineConfig } from "vite";
import react from '@vitejs/plugin-react-swc' import react from "@vitejs/plugin-react-swc";
import path from "path" import path from "path";
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
@ -11,9 +11,6 @@ export default defineConfig({
}, },
}, },
server: { server: {
port: 5175 port: 5175,
}, },
esbuild: { });
target: "esnext",
}
})