Skip to main content

Overview

Overdose Digital

Carrots Demo Store

Commands

  • Run pnpm dev to start app with hot reload.
  • Run pnpm lint to lint app.
  • Run pnpm format to format app.
  • Run pnpm run test to test app.
  • Run pnpm build to build app.
  • Run pnpm start to start built app.

Code generation

  • Run pnpm codegen to generate Typescript types from custom and Contentful Graphql schema.
  • Run pnpm codegen:graphql to generate Typescript types from custom Graphql schema.
  • Run pnpm codegen:section to generate a new section. You will be prompted to enter a section name.
  • Run pnpm codegen:contentful to generate Graphql schema & Typescript types for Contentful models.
  • Run pnpm codegen:contentful:schema to generate Graphql schema for Contentful models.
  • Run pnpm codegen:contentful:types to generate Typescript types for Contentful models.

Monorepo

Run a command targeting carrots-frontend from the monorepo root directory by using the pnpm ---filter <package_name> command prefix:

pnpm --filter "@overdose/carrots-frontend" [command]

eg:

  • pnpm --filter "@overdose/carrots-frontend" install lodash
  • pnpm --filter "@overdose/carrots-frontend" format
  • pnpm --filter "@overdose/carrots-frontend" generate:section