https://classic.yarnpkg.com/lang/en/docs/workspaces/
yarn setup
yarn install
yarn compile
to run project
node ./app/projectA
node ./app/projectB
- project A is link to
Library
with yarn workspace - only need to setup in
projectA/package.json
- Is not real time update need to
yarn install
to update Lib - cleaner when build into dist and docker image.
To add depend lib use
yarn workspaces info
yarn workspace awesome-package add react react-dom # add --dev
yarn workspace web-project remove some-package # remove
- Link via
typescript alias
- realtime update
- path is little mess up when build.
yarn run publish # Use this Repo workflow to create docker image
yarn run deploy # Use `infra` repo to deploy image to server
Link to https://github.com/mix2zeta/mock-infra via github-cli