This is a template repo in GitHub for creating a fresh monorepo for managing code and documentation.
For more details on this setup, refer to my blog post here: https://matthamlin.me/2024/february/library-docs-monorepo-template.
- Use this template (see
Use this Template
button near the top right corner of the page) - Clone the newly created repo
- Run
bun install
(if you don't have bun installed locally, refer to their docs) - Start writing some code!
Since this is a turborepo
monorepo, you can run some tasks across the repo with ease by using the configured "tasks" from the root package.json
and turbo.json
files. Currently the below tasks are supported:
build
type-check
lint
format
test
This template has a minimal generator for creating new libraries and applications, both of which are defined by the template-library
and template-app
workspaces respectively. To create a new workspace, run the following command:
bun run generator --name <name> --type <package|app>
This will create either:
- A new library within
packages/<name>
based onpackages/template-library
- A new application within
apps/<name>
based onapps/template-app
- Add an E2E example setup
- Add publish config to a package