yarn init
yarn lerna init
lerna create packagename
lerna add packagename --scope package
yarn add packagename -D -W
yarn workspace some-package remove some-dep
- First, create a GitHub personal access token to publish and read packages:
- Go to https://github.com/settings/profile, Click on developer settings
- Click on personal access token
- Select write & read packages, which should also mark the repo automatically
- Add a note so that you remember what itβs about and click on generate the token.
lerna publish --registry=https://npm.pkg.github.com/