Staff Portal (staff)
Document all scripts
All Node scripts for /portal should be comprehensively documented here -- no exceptions!
Most common
Developing
dev: Entry point for development. Continuously syncs the Common directory, and runs the Next.js app in development mode.dev:build:start:integration: Entry point for building the app for running integration tests against. This allows SSR requests to be mocked.
Building and testing
build: Builds the Next.js application into the build directory.build:prod: Entry point for building the production app. Installs NPM dependencies and then compiles. Use this script as a precursor to running the app viastart.test:e2e:dev:integration: Opens the Cypress front-end tests GUI for running integration tests- You can also manually run the system tests against our deployed integration environment by setting the baseUrl inside cypress.config.ts to
https://integration.dreambound.com
- You can also manually run the system tests against our deployed integration environment by setting the baseUrl inside cypress.config.ts to
test:e2e:dev:system: Opens the Cypress front-end tests GUI for running integration teststest:e2e:run:integration: Runs headless tests, but only for integration teststest:e2e:run:system: Runs headless tests, but only for system tests
Deploying
start: Entry point for starting the production app. Build the app first viabuild:prod.start:integration: Entry point for starting the production app for CI testing. This enables MSW (Mock Service Worker) so that SSR can be mocked.
Helpers
gql:codegen: Usually run via the eponymous parent script. Generates the GraphQL codegen file.lint: Usually run via your IDE integration during development, or in the CI workflow. Manually runs ESLint on code._build:setup: Usually run via build scripts. Uses helpers to set up Common directory and codegen GraphQL._common:build: Usually run via build scripts. Generates the GrqphQL codegen file within Common and sets up Common directory._common:gql:codegen: Usually run via build scripts. Generates the GraphQL codegen file within Common._common:copy: Usually run via build scripts. Sets up the Common directory._dev:next: Usually run viadev. Runs the Next.js app in development mode.