Yarn Workspaces Setup - Multiple JavaScript Packages (Mono-Repo)
HTML-код
- Опубликовано: 29 сен 2024
- In this video we are going to see what is mono-repo and multi-repo project structures looking like and we will see an example setup of a multi-repo project structure using Yarn workspaces.
_____________________________________
Setup tools - • Web Basics || Web Deve...
_____________________________________
Concepts you will learn
Mono-repo vs Multi-repo project architectures
Project Structures
Setup a Yarn workspaces
Multiple JavaScript Packages
Naming Convention
Best Practices for Project setup
_____________________________________
Github link for reference
github.com/dma...
Slides
docs.google.co...
_____________________________________
Checkout my crash courses for get started with web development
JavaScript Tutorial For Beginners | Part 1 - • JavaScript Tutorial Fo... JavaScript Tutorial For Beginners | Part 2 - • JavaScript Tutorial Fo...
JavaScript Tutorial For Beginners | Part 3 - • JavaScript Tutorial Fo...
JavaScript Tutorial For Beginners | Part 4 - • JavaScript Tutorial Fo...
HTML5 Crash Course in 1 Hour - • HTML5 Crash Course for...
CSS Crash Course in 1 Hour - • CSS Crash Course For A...
_____________________________________
🔗 Social Medias 🔗
Facebook: / dipesh.malvia
Instagram: / dipeshmalvia
LinkedIn: / dmalvia
_____________________________________
⭐️ Tags ⭐️
- Monorepo Architecture
- Setup Yarn workspaces
- Multiple JavaScript Packages
- Multirepo
⭐️ Hashtags ⭐️
#HTML #CSS #JavaScript #Tutorials
Disclaimer:
It doesn't feel good to have a disclaimer i
n every video but this is how the world is right now.
All videos are for educational purpose and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.
You literally just copied Ben Awad's yarn workspace video.
There is no need to copy from Ben's video as the Yarn official document have everything which I did in the video.
But the content is exactly same, and the sequence of event is also same. Even the error where you deleted node modules is also the same
Please keep copying.. i am loving it. 😘
This is the exact same video as of Ben Awad
ruclips.net/video/G8KXFWftCg0/видео.html
This is the exact content documented on the Yarn official page under Yarn Workspace. Check it out. May be we both took reference from official documentation.
Short and good explanation. We were using the Mono Repo in our company but i was not aware of that before :). With this video i came to know what is Mono Repo and about sharing the packages by comparing our codebase.
Finally, I understand! Thank you Dipesh!
Great!
I saw your code, for example inside the WEBCLIENT folder,
there is a dependencies:
"dependencies": {
"bootstrap": "^4.5.3"
}
If ADMINCLIENT were to consume bootstrp I would have to do
this again:
"dependencies": {
"bootstrap": "^4.5.3"
}
this repetition that I find strange, how could I do to
share bootstrap with ADMINCLIENT, WEBCLIENT without needing
report this back to package.json as I share
as a dependency or devDepedendency resource, without remaining
doing these repetitions, I added a dependency on
a global package.json, already available for workspace
related.... that's what I don't see anyone talking about
Hi Dipesh … How can I used the npm package with some local changes , which can be synced with the latest version updates . I created build first and then change the package code. Any approach to handle this ?
Why not so? "@mono-repo/adminclient: workspace:1.0.0" ? In what cases is the word "workspace" used?
someone help, if i declare command "yarn" or "npm start" i got error:
The nearest package directory ({path}) doesn't seem to be part of the project declared in {path}.
it has 3 if's i understand it but i dont know where to go
Great explanation!!! Please, could you make a video about husky
Thanks so much 😁😁😁
You're welcome 😊
What about starting commands like npm run test and make it to execute in both projects?
Thank you so much!
You're welcome!
Thank you so much for your video! Now I understand why most Node.js projects are organized that way.
Glad it was helpful!
Beautifuly Explained
Thank you so much 🙂
Thanks so much! short and simple as tutorials should be!
Glad you liked it!
Thanks bhai! Why not speak our "Desi Language". This will give you more exposure.
Welcome Bhai! What do you mean by "Desi Language" ? If it's Hindi then me itna accha se video nai bana pauga 😉
Which version of Yarn are you using on this video? I guess this's Yarn version 1, not Yarn 2 Berry, right?
That's right I am using yarn v1
Thanks a lot for the video, If I want to create a docker container for every one of them, would it be done in this structure, or should I Crete a docker container for both ?! and how about deploying this to a cloud service, what it would be like?
Thanks a gain
Hi Mohammad, I haven't tried this yet using with docker as I am not so good with docker but I will give a try and take sometime to provide you with any feedback on this topic. Sorry for not being helpful.
nice explanation
Best explanation I got on youtube about yarn mono-repo
Glad it was helpful!
I don't understand, I did everything you explained, my code is 100% identical with yours, but when I execute "yarn install" from the "webclient" directory (as you did), it creates "node_modules" and "yarn.lock" inside the "webclient" folder and not in the root. What did I miss?
Hey, I am making mono-repo with no-host[react, react-native, react-native-web], can you please share the code of the jest setup for this.
Great video. 🧑💻👏👍
Thanks!
If we use mono repo does that means we are reducing the bundle size for each application since common node module is installed once?
Hi Dinesh, How are you!, I understood from your video What is mono repo and multi repo but didn't understand which approach is better and if we follow mono repo what are the challenges we may face in CI/CD in mono approach? can you please guide me how to do CI/CD with Mono repo, I know with Multi Repo
Thanks for the useful video! I notice when using node 15x and npm 7x, this doesnt work as expected. When I run yarn install in the /webclient, node_modules appear inside this folder instead of in the root. Seems like npm install can only be run in the root directory to achieve the expected behavior?
Helpful video. Well presented. Thank you!
GREAT
STUFF!!
Thanks Bro!
Awesome tutorial, thank you so much!
Great! Short and simple. Thank you so much!
Please a make video for react and node mono-repo
Sure, Noted!
@@DipeshMalvia Please, bhai kab banaoge?? There's is no video on your channel.
Releasing video today for Node+React Mono-repo with Lerna.
@@DipeshMalvia Thanks, please share link
can we use yarn to convert a existing repositoy to monorepo, we are using polymer.js
Hi Abhishek, I haven't tried for existing project but my understanding is create a mono-repo first using Yarn and then move your project in packages folder of workspace then need to manage the dependencies so that all dependencies move to root node_modules.
quite helpful!
longer videos with more explanation of simple stuff is always appreciated!
Glad it was helpful!