Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

egghead.io

Migrate a Monorepo from NPM Workspaces to Turborepo

via egghead.io

Overview

Monorepos are an amazing way to collaborate on a multitude of projects with other team members. The ability to share code seamlessly between projects and have a single source of truth is paramount when working on projects with multiple moving wheels.
One of the tradeoffs of a Monorepo is all of the management you have to do to make your projects run flawlessly and simultaneously. Each project has it’s own linting, building, testing, and deploying that it runs whenever code in that project changes.
This becomes a real problem when each of your projects lints, builds, tests, and deploys on every PR into your monorepo. You might be fine with a handful of projects but as your applications scale and you accrue more projects, you will need a way to scale.
Turborepo is the tool that solves your monorepo’s needs.
Turborepo is a task runner for Monorepos. Turborepo caches the results of your CI tasks, schedules those tasks to run at maximum speed, and only runs tasks on the affected code in your PRs. And because of remote caching, your coworkers, wherever they are, will have the most up-to-date code possible.
One of the greatest things about it is that it's easy to use and can be incrementally adopted. Turborepo is a thin layer on top of your Monorepo.
Turborepo doesn't get in the way as it is only a task runner. You don't have to modify your application code or anything to make it work.
You’ll learn about
How to set up caching for both local and remote
CLI-commands and how they enhance your Monorepo
Parallel execution of your tasks
So hop in and learn about Turborepo today!
Prerequisite: This course is a continuation of Introduction to Monorepos with NPM Workspaces. To get the most out of this course, watch Monorepos with NPM Workspaces first.

Syllabus

  • What is Turborepo?
  • Install Turborepo in an Existing Monorepo
  • Migrate NPM Scripts to Turborepo Pipelines
  • Understand Turborepo Local Cache
  • Create Repository Specific Turborepo Pipelines
  • Generate a Dependency Graph for Monorepos Using Turborepo
  • Filter Pipeline Tasks Using Turborepo
  • Prevent Turborepo Exiting Early on Failing Tasks
  • Preview Turborepo Tasks at the Pipeline Level
  • Shorten Turborepo Logs using --output-logs
  • Enable Remote Caching in Vercel
  • Deploy the Client-Side Apps in a Turborepo Monorepo to Vercel
  • Enable Github Actions with Turbporepo Remote Caching
  • Migrate a VueJS Application to an Existing Turborepo Monorepo

Taught by

Alejandro Ñáñez

Reviews

4.7 rating at egghead.io based on 26 ratings

Start your review of Migrate a Monorepo from NPM Workspaces to Turborepo

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.