![]() This is easily done inside the root package.json. We already used npm as a package manager, so in order to keep things familiar we went with npm workspaces.įinally, we already used CircleCI for our backend CI, so we wanted to keep using Turborepo works with one of Yarn, npm, or pnpm workspaces. It purported to be very fast but simpler than Lerna, and one of our engineers had a positive experience with it.Īfter a few days of playing around with Turborepo, we concluded that its simple and intuitive API was sufficient justification to proceed with it as our tool of choice. We knew Lerna was a popular choice, but Turborepo had recently been acquired by Vercel and seemed highly promising. We had a first look at monorepo management. We wanted to rebuild and deploy only those parts of the monorepo that have changed, and add our desired checks on CircleCI. We wrote a design document outlining our requirements and how the new stack would meet them. The directory structure itself needed work.Īt Caribou, net-new functionality or highly complex additions to our systems must go through a design document process. We started from a flat file system containing multiple apps that were all located in the project’s root folder. Our other repos were already on CircleCI, so this allowed us to unify our CI/CD process.Īs we’ve faced multiple roadblocks undergoing this transition, we decided to record them for the benefit of developers at Caribou or anyone else undertaking similar endeavours.Add CircleCI as a layer between GitHub and Netlify to manage our CI pipeline.We strive to do 5 releases per week on average (across all of our projects), and we need to track whether we're hitting these targets or not.Enable the granular tracking of individual application deployments for our metrics monitoring.Once we got to 4 projects, the build times got really out of hand. The original monorepo setup would naively deploy all apps inside the project on every push to GitHub. Build times were increasing dramatically as we went from 2 apps in our monorepo to 4.Save time and money on ever increasing build times.Issues faced with our original monorepo setupĪs our number of apps and codebases grew, we decided that we wanted to: My current project layout looks like this: package.We at Caribou have recently adopted a new TypeScript monorepo stack for our app frontends using turborepo. You don’t have to nest projects under a “packages” directory, but it’s very common in monorepos like babel so I used that as the example layout in the blog post. The top-level “package” shouldn’t be a real package and generally doesn’t have its own dependencies. … your project looks like this? package.json # with "workspaces" config My workspace root is the Ember app and all of the workspaces are subdirectories in lib under the Ember application. Is that what I should be doing if I want to use workspaces in an Ember app? I found this article from Square and it looks like they keep all their workspaces in a packages folder, without any project at the root. I think that’s what is causing the issue. Want - if you really meant it, make it explicit by running thisĬommand again with the -W flag (or -ignore-workspace-root-check). Root rather than the workspace itself, which might not be what you ~/my-ember-app$> ember install ember-cli-clipboardĬommand failed: yarn add -dev ember-cli-clipboard -non-interactiveĮrror Running this command will add the dependency to the workspace However, it seems in doing this I broke ember install, since it causes yarn to error. ![]() Recently I added yarn workspaces to my Ember project and I’ve been super happy with the workflow! I’m able to work on an npm package alongside my Ember application without having to worry about npm link or npm publish.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |