workshop/README.md
2025-06-16 11:26:21 -07:00

34 lines
1.0 KiB
Markdown

# The Rabbit Hole
We are making a bunch of smaller projects that occasionally rely on each other. So a monorepo makes a lot of sense! It lets us share code, and share dependencies with minimal fuss.
## 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`
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:
```json
{
"dependencies": {
"@the-rabbit-hole/WHATEVER_YOU_WANT": "workspace:*"
}
}
```
Then run `bun install` and import it in your code like so:
```javascript
import { something } from "@the-rabbit-hole/WHATEVER_YOU_WANT"
```
## What does corey not love about this?
- I'd prefer the namespace to be shorter, `@the-rabbit-hole` is a bit long.
- There are lots things I don't love about nano-remix, but it works well enough for now.
## How do I run the tests?
😂