Development quickstart
This guide will get you up and running with a local development environment for the Carrots PWA.
Requirements
Local environment setup
- Clone the repo locally
- Install dependencies with
pnpm install
- 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 withtsc
pnpm lint
- lints with ESLint, Prettier, and Stylelintpnpm run test
- runs tests with Jestpnpm test:update-snapshots
- runs snapshot tests and updates snapshotspnpm 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.