A base monorepo setup for faster development
The monorepo workspaces consist of three sections:
apps/*
- Containsfrontend
by defaultpackages/*
- Containsui
by defaultconfig/*
- A space for configuration files to be extended from.config-typescript
config-eslint
: (Typescript is automatically injected if tsconfig.json is present)config-eslint/react
config-eslint/node
config-eslint/cypress
config-eslint/ava
config-eslint/jest
config-prettier
config-snowpack
:config-snowpack/react
config-browserslist
- node:
>=16.0.0
- yarn:
npm i -g yarn
# Shallow Clone
npx degit https://github.com/joshmeads/monorepo_base project-name
# or
git clone -–depth 1 https://github.com/joshmeads/monorepo_base.git
# Add original upstream
git remote add upstream https://github.com/joshmeads/monorepo_base.git
# Set your local Main branch to be in sync
git pull upstream main
# or
git rebase upstream/main
# Update the main branch on origin
git push origin main # you may need -f if you rebased
# Fetch new commits
git fetch upstream
# Checkout main
git checkout main
# Rebase against upstream
git rebase upstream/main
# Set your local Main branch to be in sync
git push origin main # you may need -f if you rebased
yarn
to link all packages / dependencies- (if using VSCode) Install Yarn Tools:
yarn dlx @yarnpkg/pnpify --sdk vscode
Application:
- Start:
yarn workspace <name> start
- Build:
yarn workspace <name> build
Components:
- Start Storybook:
yarn workspace <name> start
- Yarn PNP (via
yarn dlx @yarnpkg/pnpify --sdk vscode
) requires the packages to be installed in the root package.json in order to fix the tooling .vscode/settings.json
containsfiles.exclude
to hide items in the vscode sidebar. Remove/comment these if you need access to those files.