This is a multi-workspace repo that requires npm v10. The minimum node version is set to v22.11.0.
Node can be downloaded from the official Node.js site. You may also consider using a Node version manager.
Your version of Node may not ship with npm v10. To install it, run:
npm install [email protected] -gNote: if you see this error:
npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.
you can run npx next telemetry disable
From the root of the project, install dependencies by running:
npm installInstalling from the root of the repository is required to avoid multiple installations of React in the workspaces. When this happens, React will fail to render.
Dependencies can also be installed from the root of the repository. To install a dependency for a specific workspace, you can run:
npm install --save my-package --workspace=packages/coreSince this is a TypeScript project, installing the community type definitions may also be required:
npm install --save-dev @types/my-package --workspace=packages/coreRun the prototype in dev mode with auto-rebuilding:
npm run devBy default, this will start a dev server listening to http://localhost:3000
Note: Recompiling the type definitions for core needs to be done manually:
npm run compile --w=packages/coreRun ESLint for all the workspaces:
npm run lintRun prettier for all the workspaces:
npm run formatThis project uses jest for testing.
| Test Type | Filename |
|---|---|
| Unit | *.unit.test.ts |
| Integration | *.int.test.ts |
Tests should live in the same directory as if a single module is under test. Since unit tests should only test a single module, they should also live in the directory. For example,
+ /src
| - monarch.ts
| - monarch.unit.ts
| - monarch.int.ts
npm run test will run unit tests.
npm run test:int will run integration tests.
npm run test:all will run both unit and integration tests.
docker build -t gen3ff . will build a container with all available packages built
docker run -p 3000:3000 -it gen3ff will run the container from above.
The container can be viewed at localhost:3000{BASE_PATH | /}
Note that the base path is configurable with the BASE_PATH environment variable. It is left empty by default when running locally
NODE_EXTRA_CA_CERTS=$HOME/Library/Application Support/mkcert/rootCA.pem