I’m using tldraw package for my website and got stuck on the deployment process. I asked for help on GitHub, but I didn’t get a response. I was wondering if anyone here would be able to help me since it might be a well-known deployment process.
Background
tldraw is a mono-repo which consists of several repos/workspaces.
I made modifications in some files in packages/tldraw
. After my modifications I wasn’t sure if I am supposed to yarn install/build
in the workspace, or on mono-repo level.
I tried the latter approach and pushed my changes to my private repo so I can pull it in my docker container.
I install the root package.json
dependencies first with Yarn.
After that I wanted to install packages/tldraw
only. I’m stuck here. How can I do this?
I tried yarn add ./tldraw/packages/tldraw
but it returns Error: @tldraw/editor@workspace:*: Workspace not found (@tldraw/editor@workspace:*)
What’s wrong in my approach?
Dockerfile
WORKDIR /code
COPY .yarnrc.yml .yarnrc.yml
COPY package.json /code/
RUN yarn install
RUN git clone https://github.com/my-tldraw.git my-tldraw
WORKDIR /code/my-tldraw
RUN yarn install
RUN yarn build
WORKDIR /code
RUN yarn add ./my-tldraw/packages/tldraw
RUN rm -f .yarnrc.yml
Project structure
project/
package.json
tldraw/ (source-code, mono-repo)
package.json
packages/tldraw (workspace)
package.json
more files...
more files...