Skip to main content

Development quickstart

This guide will get you up and running with a local development environment for the Carrots PWA.

Requirements

Local environment setup

  1. Clone the repo locally
  2. Install dependencies with pnpm install
  3. Start all applications in development mode with pnpm dev

Commands

Monorepo-wide scripts are located in the monorepo root package.json. Each app and package has additional dedicated scripts in their local package.json.

Development scripts

  • pnpm dev - starts all apps

Testing scripts

  • pnpm type-check - checks types with tsc
  • pnpm lint - lints with ESLint, Prettier, and Stylelint
  • pnpm run test - runs tests with Jest
  • pnpm test:update-snapshots - runs snapshot tests and updates snapshots
  • pnpm test:e2e - runs e2e tests with Playwright

Scoping commands

To scope a command to a specific package append:

---filter=[app/package name]

Examples:

  • Lint carrots-frontend - pnpm lint --filter=@overdose/carrots-frontend
  • Run carrots-frontend E2E tests - pnpm test:e2e --filter=@overdose/carrots-frontend
  • Run base components unit tests - pnpm test --filter=@overdose/components

See Turborepo Command-Line Reference for additional available CLI modifications.

Monorepo

Carrots is a monorepo, which means it contains multiple apps and packages. You can find the packages in the packages directory and apps in the app directory.

Check out the monorepo page for more information.