git clone [email protected]:ethereum-optimism/optimism.git
cd optimism
yarn
yarn build # this is needed to generate the dist files locally
yarn test
If you get dependency errors: git clean -fx && yarn clean && rm -rf node_modules/@eth-optimism/* && yarn install --force
- You solely use yarn workspaces for the Mono-Repo workflow.
- You use lerna’s utility commands to optimize managing of multiple packages, e.g., selective execution of npm scripts for testing.
- You use lerna for publishing packages since lerna provides sophisticated features with its version and publish commands.
BRANCH_POINT="$(git merge-base $(git rev-parse --abbrev-ref HEAD) $(git describe origin/master))"
changedPackages="$(npx lerna ls -p --since $BRANCH_POINT --include-dependents)"