diff --git a/README.md b/README.md index 4375e6a..99dd899 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ We are making a bunch of smaller projects that occasionally rely on each other. ## Ok, I want to add a new project. - `bun init packages/WHATEVER_YOU_WANT` -- Edit the `package.json` and change the name to `@the-rabbit-hole/WHATEVER_YOU_WANT` +- Edit the `package.json` and change the name to `@workshop/WHATEVER_YOU_WANT` -To add one of the existing packages as a dependency, edit the `package.json` and add it to the `dependencies` or `devDependencies` section. For example, if you want to add `@the-rabbit-hole/WHATEVER_YOU_WANT`, you would do: +To add one of the existing packages as a dependency, edit the `package.json` and add it to the `dependencies` or `devDependencies` section. For example, if you want to add `@workshop/WHATEVER_YOU_WANT`, you would do: ```json { "dependencies": { - "@the-rabbit-hole/WHATEVER_YOU_WANT": "workspace:*" + "@workshop/WHATEVER_YOU_WANT": "workspace:*" } } ``` @@ -20,13 +20,13 @@ To add one of the existing packages as a dependency, edit the `package.json` and Then run `bun install` and import it in your code like so: ```javascript -import { something } from "@the-rabbit-hole/WHATEVER_YOU_WANT" +import { something } from "@workshop/WHATEVER_YOU_WANT" ``` ## What does corey not love about this? - I put near-zero effort into naming things. -- I'd prefer the namespace to be shorter, `@the-rabbit-hole` is a bit long. +- I'd prefer the namespace to be shorter, `@workshop` is a bit long. - There are lots things I don't love about nano-remix, but it works well enough for now. - The bun tailwind plugin doesn't work with nano-remix yet, but it looks like in a future bun release it will. diff --git a/bun.lock b/bun.lock index 94842db..dd31f12 100644 --- a/bun.lock +++ b/bun.lock @@ -2,13 +2,13 @@ "lockfileVersion": 1, "workspaces": { "": { - "name": "the-rabbit-hole", + "name": "workshop", }, "packages/http": { - "name": "@the-rabbit-hole/http", + "name": "@workshop/http", "dependencies": { - "@the-rabbit-hole/nano-remix": "workspace:*", - "@the-rabbit-hole/shared": "workspace:*", + "@workshop/nano-remix": "workspace:*", + "@workshop/shared": "workspace:*", "hono": "^4.7.11", }, "devDependencies": { @@ -34,7 +34,7 @@ }, }, "packages/nano-remix": { - "name": "@the-rabbit-hole/nano-remix", + "name": "@workshop/nano-remix", "dependencies": { "hono": "^4.7.11", }, @@ -46,7 +46,7 @@ }, }, "packages/shared": { - "name": "@the-rabbit-hole/shared", + "name": "@workshop/shared", "devDependencies": { "@types/bun": "latest", }, @@ -55,7 +55,7 @@ }, }, "packages/spike": { - "name": "@the-rabbit-hole/spike", + "name": "@workshop/spike", "dependencies": { "discord.js": "^14.19.3", "luxon": "^3.6.1", @@ -90,13 +90,13 @@ "@sapphire/snowflake": ["@sapphire/snowflake@3.5.3", "", {}, "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ=="], - "@the-rabbit-hole/http": ["@the-rabbit-hole/http@workspace:packages/http"], + "@workshop/http": ["@workshop/http@workspace:packages/http"], - "@the-rabbit-hole/nano-remix": ["@the-rabbit-hole/nano-remix@workspace:packages/nano-remix"], + "@workshop/nano-remix": ["@workshop/nano-remix@workspace:packages/nano-remix"], - "@the-rabbit-hole/shared": ["@the-rabbit-hole/shared@workspace:packages/shared"], + "@workshop/shared": ["@workshop/shared@workspace:packages/shared"], - "@the-rabbit-hole/spike": ["@the-rabbit-hole/spike@workspace:packages/spike"], + "@workshop/spike": ["@workshop/spike@workspace:packages/spike"], "@types/bun": ["@types/bun@1.2.16", "", { "dependencies": { "bun-types": "1.2.16" } }, "sha512-1aCZJ/6nSiViw339RsaNhkNoEloLaPzZhxMOYEa7OzRzO41IGg5n/7I43/ZIAW/c+Q6cT12Vf7fOZOoVIzb5BQ=="], diff --git a/package.json b/package.json index 73d167f..b33dbbb 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "the-rabbit-hole", + "name": "workshop", "private": true, "workspaces": [ "packages/*" @@ -9,9 +9,9 @@ "semi": false }, "scripts": { - "http": "bun run --filter=@the-rabbit-hole/http start", - "bot:cli": "bun run --filter=@the-rabbit-hole/spike bot:cli", - "bot:discord": "bun run --filter=@the-rabbit-hole/spike bot:discord", + "http": "bun run --filter=@workshop/http start", + "bot:cli": "bun run --filter=@workshop/spike bot:cli", + "bot:discord": "bun run --filter=@workshop/spike bot:discord", "start": "bun run main.ts" } } \ No newline at end of file diff --git a/packages/http/package.json b/packages/http/package.json index 0c97ccc..19861fe 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -1,5 +1,5 @@ { - "name": "@the-rabbit-hole/http", + "name": "@workshop/http", "module": "src/server.ts", "type": "module", "private": true, @@ -13,8 +13,8 @@ }, "dependencies": { "hono": "^4.7.11", - "@the-rabbit-hole/nano-remix": "workspace:*", - "@the-rabbit-hole/shared": "workspace:*" + "@workshop/nano-remix": "workspace:*", + "@workshop/shared": "workspace:*" }, "devDependencies": { "@types/bun": "latest" diff --git a/packages/http/src/components/createReminder.tsx b/packages/http/src/components/createReminder.tsx index 7be43a4..e8fb833 100644 --- a/packages/http/src/components/createReminder.tsx +++ b/packages/http/src/components/createReminder.tsx @@ -1,5 +1,5 @@ -import { Form } from "@the-rabbit-hole/nano-remix" -import { users } from "@the-rabbit-hole/shared/reminders" +import { Form } from "@workshop/nano-remix" +import { users } from "@workshop/shared/reminders" type Props = { loading: boolean diff --git a/packages/http/src/routes/index.tsx b/packages/http/src/routes/index.tsx index 42a64de..8a70dbd 100644 --- a/packages/http/src/routes/index.tsx +++ b/packages/http/src/routes/index.tsx @@ -1,6 +1,6 @@ -import KV from "@the-rabbit-hole/shared/kv" -import { Form, type Head, type LoaderProps, useAction } from "@the-rabbit-hole/nano-remix" -import { addReminder, deleteReminder, type Reminder } from "@the-rabbit-hole/shared/reminders" +import KV from "@workshop/shared/kv" +import { Form, type Head, type LoaderProps, useAction } from "@workshop/nano-remix" +import { addReminder, deleteReminder, type Reminder } from "@workshop/shared/reminders" import { CreateReminder } from "@/components/createReminder" export const head: Head = { diff --git a/packages/http/src/server.tsx b/packages/http/src/server.tsx index c14fec1..5a673f9 100644 --- a/packages/http/src/server.tsx +++ b/packages/http/src/server.tsx @@ -1,5 +1,5 @@ import { serve } from "bun" -import { nanoRemix } from "@the-rabbit-hole/nano-remix" +import { nanoRemix } from "@workshop/nano-remix" import { join } from "node:path" const server = serve({ diff --git a/packages/nano-remix/package.json b/packages/nano-remix/package.json index 4ee4a01..9d4ce43 100644 --- a/packages/nano-remix/package.json +++ b/packages/nano-remix/package.json @@ -1,5 +1,5 @@ { - "name": "@the-rabbit-hole/nano-remix", + "name": "@workshop/nano-remix", "module": "src/main.ts", "type": "module", "types": "src/main.ts", diff --git a/packages/nano-remix/src/nanoRemix.ts b/packages/nano-remix/src/nanoRemix.ts index c52cd09..171ff45 100644 --- a/packages/nano-remix/src/nanoRemix.ts +++ b/packages/nano-remix/src/nanoRemix.ts @@ -55,7 +55,7 @@ const buildDynamicRoute = async (distDir: string, routeName: string, filepath: s // Only import the Component so that tree-shaking will get rid of the server-side code const code = ` import Component from "${filepath}" -import { wrapComponentWithLoader} from "@the-rabbit-hole/nano-remix" +import { wrapComponentWithLoader} from "@workshop/nano-remix" import { render } from 'hono/jsx/dom' const root = document.getElementById('root') diff --git a/packages/shared/package.json b/packages/shared/package.json index 79452a5..169498b 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,5 +1,5 @@ { - "name": "@the-rabbit-hole/shared", + "name": "@workshop/shared", "type": "module", "exports": { "./kv": "./src/kv.ts", diff --git a/packages/spike/package.json b/packages/spike/package.json index f4f1f21..807b477 100644 --- a/packages/spike/package.json +++ b/packages/spike/package.json @@ -1,5 +1,5 @@ { - "name": "@the-rabbit-hole/spike", + "name": "@workshop/spike", "module": "src/discord/index.ts", "type": "module", "private": true, diff --git a/packages/spike/src/ai.ts b/packages/spike/src/ai.ts index 851e52d..044f6c4 100644 --- a/packages/spike/src/ai.ts +++ b/packages/spike/src/ai.ts @@ -1,8 +1,8 @@ import OpenAI from "openai" -import { ensure } from "@the-rabbit-hole/shared/utils" -import KV from "@the-rabbit-hole/shared/kv" +import { ensure } from "@workshop/shared/utils" +import KV from "@workshop/shared/kv" import { buildInstructions } from "@/instructions" -import { log } from "@the-rabbit-hole/shared/log" +import { log } from "@workshop/shared/log" import { getToolsJSON, type CustomTool } from "@/tools" import { zodFunction } from "openai/helpers/zod.mjs" diff --git a/packages/spike/src/cli/index.ts b/packages/spike/src/cli/index.ts index ec9d995..1974a81 100644 --- a/packages/spike/src/cli/index.ts +++ b/packages/spike/src/cli/index.ts @@ -2,7 +2,7 @@ import { createInterface } from "node:readline" import { aiErrorMessage, getAIResponse } from "@/ai" import { buildInstructions } from "@/instructions" import type OpenAI from "openai" -import { currentLocalTime } from "@the-rabbit-hole/shared/utils" +import { currentLocalTime } from "@workshop/shared/utils" import { tools } from "@/tools" // Setup readline interface diff --git a/packages/spike/src/discord/cron.ts b/packages/spike/src/discord/cron.ts index 5b4a4d4..1288133 100644 --- a/packages/spike/src/discord/cron.ts +++ b/packages/spike/src/discord/cron.ts @@ -1,4 +1,4 @@ -import { getPendingReminders, updateReminder } from "@the-rabbit-hole/shared/reminders" +import { getPendingReminders, updateReminder } from "@workshop/shared/reminders" import { DateTime } from "luxon" import { Client } from "discord.js" import { buildInstructions } from "@/instructions" diff --git a/packages/spike/src/discord/respond.ts b/packages/spike/src/discord/respond.ts index c3bb154..6235e4b 100644 --- a/packages/spike/src/discord/respond.ts +++ b/packages/spike/src/discord/respond.ts @@ -1,7 +1,7 @@ import { aiErrorMessage, getAIResponse } from "@/ai" import { buildInstructions } from "@/instructions" import { tools } from "@/tools" -import { currentLocalTime } from "@the-rabbit-hole/shared/utils" +import { currentLocalTime } from "@workshop/shared/utils" import type { Message } from "discord.js" import type OpenAI from "openai" diff --git a/packages/spike/src/tools.ts b/packages/spike/src/tools.ts index 4907940..de84b33 100644 --- a/packages/spike/src/tools.ts +++ b/packages/spike/src/tools.ts @@ -1,5 +1,5 @@ -import { addReminder, getPendingReminders, updateReminder, users } from "@the-rabbit-hole/shared/reminders" -import KV from "@the-rabbit-hole/shared/kv" +import { addReminder, getPendingReminders, updateReminder, users } from "@workshop/shared/reminders" +import KV from "@workshop/shared/kv" import OpenAI from "openai" import { zodFunction } from "openai/helpers/zod" import { z } from "zod"