Skip to content

A quick example of how to get Yarn v2 nested Worktrees up and running ๐Ÿˆ

Notifications You must be signed in to change notification settings

peterwiebe/example-yarn-v2-nested-workspaces-worktrees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Yarn v2 Nested Workspaces/Worktree Example

The basics covered in this example are nested Worktrees and Workspaces where one of the nested Workspaces is dependent on a top level Workspace (a common library used amongst many Workspaces)

Requirements

  • Yarn v1 (globally installed)
    • Check to make sure by entering yarn -v in a directory outside of this project in your command line
    • Inside this project the result of yarn -v should result in something like 2.0.0-rc.30

Things to Note

  • You can test to make sure everything is working by running the following command from anywhere in the project directory:

    yarn workspace @workspaces/dashboard-client start

    • โš ๏ธ If you try to run the command node dashboard/client/index.js from the root directory it will say it was unable to find the @workspaces/common package because node by itself doesn't know how to resolve the workspace: protocol in the package.json. You must use yarn to run your package
  • Yarn v2 is utilized via .yarnrc.yml file

  • The root package.json doesn't need to identify each nested Workspace. Instead you can list the Worktree that those nested Workspaces are contained in, and it will know about the nested Workspaces through the "workspaces" property in the Worktree package.json like dashboard/package.json

Please let me know if this was helpful for you ๐Ÿ™

About

A quick example of how to get Yarn v2 nested Worktrees up and running ๐Ÿˆ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published