Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 981 Bytes

using-yarn-workspaces.md

File metadata and controls

63 lines (39 loc) · 981 Bytes

Using Yarn Workspaces

Non-vendor packages can be linked to packages within a local Yarn workspace.

You have 2 options:

  1. Clone the workspace when other developers run indo next.

  2. Treat the workspace as a local override.

 

Option 1 - Force others to use it

  1. Clone the workspace (with indo):
indo clone https://github.com/example/example.git ./vendor/example --branch next
  1. Prepare the workspace:
cd ./vendor/example && yarn
  1. Expose packages in the workspace to your non-vendor packages:
indo
  1. Done!

 

Option 2 - Keep it to myself

  1. Clone the workspace (with git):
git clone https://github.com/example/example.git ./vendor/example --branch next
  1. Prepare the workspace
cd ./vendor/example && yarn
  1. Expose packages in the workspace to your non-vendor packages:
indo
  1. Make sure the workspace is ignored by git
echo '/vendor/' >> .gitignore
  1. Done!