Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smonn/sample-monorepo
https://github.com/smonn/sample-monorepo
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/smonn/sample-monorepo
- Owner: smonn
- Created: 2021-10-04T17:51:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-06T00:56:20.000Z (about 3 years ago)
- Last Synced: 2023-03-11T01:52:06.119Z (almost 2 years ago)
- Language: TypeScript
- Size: 433 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sample monorepo
Based on the [Monorepo Style Guide][guide], with some tweaks:
- Use npm v7 instead of yarn
- Use TypeScript[guide]: https://monorepo.guide/
## How to use
```bash
# install dependencies (this will also build packages/* and services/*)
npm install# start in dev mode in one terminal
npm run dev:api# start in dev mode in another terminal
npm run dev:web# add dependency zod to package @demo/name
npm -w @demo/name install zod -E# run script build in package @demo/name
npm -w @demo/name run build# add a new package (may need to update the package.json name)
npm init -w ./packages/name# ensure package is correctly configured for preconstruct
npx preconstruct fix
```## Recommended reading
- https://monorepo.guide/getting-started
- https://monorepo.guide/thinking-in-monorepos
- https://docs.npmjs.com/cli/v7/using-npm/workspaces
- https://preconstruct.tools/
- https://github.com/Thinkmill/manypkg