From 5d8781462d5c70be12902cd16a03e2f9fa61a642 Mon Sep 17 00:00:00 2001 From: Jeff Emmett <46964190+Jeff-Emmett@users.noreply.github.com> Date: Sat, 7 Dec 2024 22:48:02 -0500 Subject: [PATCH] npm --- .gitignore | 15 +--- .npmrc | 3 + README.md | 2 +- canvas-website.code-workspace | 12 --- package.json | 13 ++- src/App.tsx | 158 +++++++++++++++++----------------- vercel.json | 4 +- wrangler.toml | 1 - 8 files changed, 91 insertions(+), 117 deletions(-) create mode 100644 .npmrc delete mode 100644 canvas-website.code-workspace diff --git a/.gitignore b/.gitignore index e29814c..fa35967 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,11 @@ dist/ .DS_Store bun.lockb -yarn.lock -# Logs logs _.log npm-debug.log_ -yarn-debug.log* -yarn-error.log* lerna-debug.log* .pnpm-debug.log* @@ -95,7 +91,6 @@ web_modules/ # Yarn Integrity file -.yarn-integrity # dotenv environment variable files @@ -163,14 +158,6 @@ dist .vscode-test -# yarn v2 - -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.\* - .wrangler/ # Vercel @@ -191,3 +178,5 @@ dist # Keep example file !.env.example + +package-lock.json \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..78854da --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +legacy-peer-deps=true +strict-peer-dependencies=false +auto-install-peers=true \ No newline at end of file diff --git a/README.md b/README.md index be5786b..af28b22 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ A website. -Do `bun i` and `bun dev` +Do `npm i` and `npm run dev` diff --git a/canvas-website.code-workspace b/canvas-website.code-workspace deleted file mode 100644 index be8366e..0000000 --- a/canvas-website.code-workspace +++ /dev/null @@ -1,12 +0,0 @@ -{ - "folders": [ - { - "path": "." - }, - { - "name": "jeffemmett.com", - "path": "../jeffemmett.com" - } - ], - "settings": {} -} \ No newline at end of file diff --git a/package.json b/package.json index a12f11e..6c188bc 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Jeff Emmett's personal website", "type": "module", "scripts": { - "dev": "concurrently --kill-others --names client,worker --prefix-colors blue,red \"yarn dev:client\" \"yarn dev:worker\"", + "dev": "concurrently --kill-others --names client,worker --prefix-colors blue,red \"bun dev:client\" \"bun dev:worker\"", "dev:client": "vite --host --port 5173", "dev:worker": "wrangler dev --local --port 5172 --ip 0.0.0.0", "build": "tsc && vite build", @@ -26,19 +26,18 @@ "gray-matter": "^4.0.3", "itty-router": "^5.0.17", "lodash.throttle": "^4.1.1", - "react-error-boundary": "^4.1.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-router-dom": "^7.0.2", "tldraw": "^3.6.0", - "vercel": "^39.1.1", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "vercel": "^39.1.1" }, "devDependencies": { "@cloudflare/types": "^6.0.0", "@cloudflare/workers-types": "^4.20240821.1", "@types/lodash.throttle": "^4", - "@types/react": "^18.2.0", - "@types/react-dom": "^18.2.0", + "@types/react": "^19.0.1", + "@types/react-dom": "^19.0.1", "@vitejs/plugin-react": "^4.0.3", "@vitejs/plugin-react-swc": "^3.6.0", "concurrently": "^9.1.0", diff --git a/src/App.tsx b/src/App.tsx index 29a2e29..7f55f75 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,95 +1,91 @@ -import { inject } from '@vercel/analytics'; -import "tldraw/tldraw.css"; +import { inject } from "@vercel/analytics" +import "tldraw/tldraw.css" import "@/css/style.css" -import ReactDOM from "react-dom/client"; -import { Default } from "@/routes/Default"; -import { BrowserRouter, Route, Routes } from 'react-router-dom'; -import { Contact } from "@/routes/Contact"; -import { Board } from './routes/Board'; -import { Inbox } from './routes/Inbox'; -import { - Editor, - Tldraw, - TLShapeId, -} from 'tldraw'; -import { components, overrides } from './ui-overrides' -import { ChatBoxShape } from './shapes/ChatBoxShapeUtil'; -import { VideoChatShape } from './shapes/VideoChatShapeUtil'; -import { ChatBoxTool } from './tools/ChatBoxTool'; -import { VideoChatTool } from './tools/VideoChatTool'; -import { EmbedTool } from './tools/EmbedTool'; -import { EmbedShape } from './shapes/EmbedShapeUtil'; +import { Default } from "@/routes/Default" +import { BrowserRouter, Route, Routes } from "react-router-dom" +import { Contact } from "@/routes/Contact" +import { Board } from "./routes/Board" +import { Inbox } from "./routes/Inbox" +import { Editor, Tldraw, TLShapeId } from "tldraw" +import { components, overrides } from "./ui-overrides" +import { ChatBoxShape } from "./shapes/ChatBoxShapeUtil" +import { VideoChatShape } from "./shapes/VideoChatShapeUtil" +import { ChatBoxTool } from "./tools/ChatBoxTool" +import { VideoChatTool } from "./tools/VideoChatTool" +import { EmbedTool } from "./tools/EmbedTool" +import { EmbedShape } from "./shapes/EmbedShapeUtil" +import { createRoot } from "react-dom/client" -inject(); +inject() -const customShapeUtils = [ChatBoxShape, VideoChatShape, EmbedShape]; -const customTools = [ChatBoxTool, VideoChatTool, EmbedTool]; +const customShapeUtils = [ChatBoxShape, VideoChatShape, EmbedShape] +const customTools = [ChatBoxTool, VideoChatTool, EmbedTool] export default function InteractiveShapeExample() { - return ( -