Skip to content

How to use multiple approaches to yarn in a single project 🧶

Notifications You must be signed in to change notification settings

matty-at-rdc/splitterooski

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Splitterooski 🖖

What is this?

This project shows how to maintain two incompatible approaches to yarn 🧶 simultaneosuly.

How do I use this?

Start by cloning the repo.

  • Top level directory
    • sh run.sh 😊 -- happy
    • You just used an external node module without installing it!
  • Legacy directory
    • cd legacy
    • sh run.sh 💥
    • yarn install -- legacy/node_modules created
    • sh run.sh 😊 -- happy

What to notice?

  • The mandatory usage of yarn node instead of node when invoking node directly (not needed when using yarn to invoke).
    • See documentation for more information, but start here
  • The addition of the line nodeLinker: node-modules at legacy/.yarnrc.yml
  • The shared version of yarn between projects based on: .yarn/releases/yarn-3.4.1.cjs
    • Run yarn --version from either location and you'll get 3.4.1
  • The absence of a node_modules directory in the top and the requirement of a node_modules directory in legacy
    • You will need to run a yarn install in that directory to get it and it won't resolve it's dependecny on lodash get otherwise.
  • The .gitignore file to see what we should keep and leave and how this help with "Zero Install"

About

How to use multiple approaches to yarn in a single project 🧶

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published