Monorepo
Turborepo
The project uses Turborepo to orchestrate builds and dev servers. Configuration lives in turbo.json.
Main tasks
| Task | Description |
|---|---|
dev | Start dev server (depends on ^build) |
build | Production build |
start | Start production server |
Filters
To run tasks for specific apps:
turbo dev --filter=@nittio/bko-api... # bko-api and its dependencies
turbo build --filter=@nittio/app-console # only app-console
Yarn Workspaces
Workspaces are configured in the root package.json:
{
"workspaces": ["apps/*", "packages/*"]
}
Adding dependencies
# To a specific workspace
yarn workspace @nittio/bko-api add <package>
# To the root (shared devDependencies)
yarn add -W -D <package>
Creating a new package
- Create the folder at
packages/<name>/ - Add
package.jsonwith"name": "@nittio/<name>" - Export the public API through
index.ts - Include
fixture/withCreateFixtureandresetCounter - Run
yarn installat the root