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.

Комментарии • 57

  • @me_shubham
    @me_shubham 3 года назад +5

    You literally just copied Ben Awad's yarn workspace video.

    • @DipeshMalvia
      @DipeshMalvia  3 года назад +1

      There is no need to copy from Ben's video as the Yarn official document have everything which I did in the video.

    • @ArunSharma-ij5pw
      @ArunSharma-ij5pw 2 года назад +2

      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

    • @rbb023
      @rbb023 7 месяцев назад

      Please keep copying.. i am loving it. 😘

  • @ArunSharma-ij5pw
    @ArunSharma-ij5pw 2 года назад +1

    This is the exact same video as of Ben Awad
    ruclips.net/video/G8KXFWftCg0/видео.html

    • @DipeshMalvia
      @DipeshMalvia  2 года назад

      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.

  • @BestHomeMadeFood56
    @BestHomeMadeFood56 2 года назад +2

    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.

  • @drewbird87
    @drewbird87 3 года назад +4

    Finally, I understand! Thank you Dipesh!

  • @alexon2010
    @alexon2010 11 месяцев назад

    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

  • @princegehlot3828
    @princegehlot3828 6 месяцев назад

    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 ?

  • @EugenePetrov-l6l
    @EugenePetrov-l6l Год назад

    Why not so? "@mono-repo/adminclient: workspace:1.0.0" ? In what cases is the word "workspace" used?

  • @tommytommy1355
    @tommytommy1355 Год назад

    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

  • @kirillzlobin7135
    @kirillzlobin7135 Год назад

    Great explanation!!! Please, could you make a video about husky

  • @duyphuongnguyen431
    @duyphuongnguyen431 6 месяцев назад +1

    Thanks so much 😁😁😁

  • @kirillzlobin7135
    @kirillzlobin7135 Год назад

    What about starting commands like npm run test and make it to execute in both projects?

  • @ahmadsaleh7887
    @ahmadsaleh7887 2 года назад +1

    Thank you so much!

  • @CodeChronicals
    @CodeChronicals Год назад +1

    Thank you so much for your video! Now I understand why most Node.js projects are organized that way.

  • @mr.nobody8365
    @mr.nobody8365 3 года назад +2

    Beautifuly Explained

  • @CodeStock
    @CodeStock 2 года назад +2

    Thanks so much! short and simple as tutorials should be!

  • @whoman7930
    @whoman7930 3 года назад +1

    Thanks bhai! Why not speak our "Desi Language". This will give you more exposure.

    • @DipeshMalvia
      @DipeshMalvia  3 года назад +1

      Welcome Bhai! What do you mean by "Desi Language" ? If it's Hindi then me itna accha se video nai bana pauga 😉

  • @petruarakiss
    @petruarakiss 3 года назад +1

    Which version of Yarn are you using on this video? I guess this's Yarn version 1, not Yarn 2 Berry, right?

  • @mohammadfouad6706
    @mohammadfouad6706 3 года назад +1

    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

    • @DipeshMalvia
      @DipeshMalvia  3 года назад +1

      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.

  • @dev.raghuvanshi
    @dev.raghuvanshi 7 месяцев назад

    nice explanation

  • @returnZeroo
    @returnZeroo 2 года назад +1

    Best explanation I got on youtube about yarn mono-repo

  • @TheMurtukov
    @TheMurtukov 3 года назад

    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?

  • @krishnamani2835
    @krishnamani2835 2 года назад

    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.

  • @mdmobashirraza3117
    @mdmobashirraza3117 2 года назад +1

    Great video. 🧑‍💻👏👍

  • @arihantjain8347
    @arihantjain8347 Год назад

    If we use mono repo does that means we are reducing the bundle size for each application since common node module is installed once?

  • @vasantharajuk8484
    @vasantharajuk8484 3 года назад

    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

  • @edmundchan6601
    @edmundchan6601 3 года назад

    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?

  • @vishnusingh4121
    @vishnusingh4121 3 года назад

    Helpful video. Well presented. Thank you!

  • @justnewcontent
    @justnewcontent 2 года назад +1

    GREAT
    STUFF!!

  • @derinasir
    @derinasir 2 года назад

    Awesome tutorial, thank you so much!

  • @shamilmammadov8246
    @shamilmammadov8246 3 года назад

    Great! Short and simple. Thank you so much!

  • @JustGamingJG
    @JustGamingJG 3 года назад +1

    Please a make video for react and node mono-repo

    • @DipeshMalvia
      @DipeshMalvia  3 года назад

      Sure, Noted!

    • @whoman7930
      @whoman7930 3 года назад

      @@DipeshMalvia Please, bhai kab banaoge?? There's is no video on your channel.

    • @DipeshMalvia
      @DipeshMalvia  3 года назад

      Releasing video today for Node+React Mono-repo with Lerna.

    • @JustGamingJG
      @JustGamingJG 3 года назад

      @@DipeshMalvia Thanks, please share link

  • @abhishekpatil108
    @abhishekpatil108 3 года назад

    can we use yarn to convert a existing repositoy to monorepo, we are using polymer.js

    • @DipeshMalvia
      @DipeshMalvia  3 года назад

      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.

  • @CharlieBabbitt1988
    @CharlieBabbitt1988 3 года назад +1

    quite helpful!

    • @CharlieBabbitt1988
      @CharlieBabbitt1988 3 года назад

      longer videos with more explanation of simple stuff is always appreciated!

    • @DipeshMalvia
      @DipeshMalvia  3 года назад

      Glad it was helpful!