Angular Builders - Creating Custom Builder from Scratch (Advanced, 2022)

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • Angular builders are nodejs scripts executed by Angular CLI and perform different tasks like application build, serving the app, or running different kinds of tests. You can create your own builders that can perform some particular tasks for your Angular application and in this tutorial, you will learn how to do that. At the end of this video, we will build a custom builder that patches the application build information in a dedicated JSON file, the JSON file name can be configured by providing custom options for the builder, and additionally, you will learn how to schedule another target from your custom builder. I am pretty sure you will learn a lot of cool stuff today. Enjoy! :)
    💥 Become a PRO with my in-depth Angular Forms Course💥
    🔗 10% discount for the first 10 students - bit.ly/advanced-ng-forms-disc...
    🕒 Time Codes:
    00:00:00 - Intro;
    00:01:14 - Project Description;
    00:02:10 - What we are going to build;
    00:02:39 - Implementing a custom architect target;
    00:05:35 - Creating an NPM package for the builder;
    00:07:26 - Describing builders in the builder.json file;
    00:11:15 - Creating TypeScript compilation pipeline for builder package;
    00:18:51 - Implementing basic builder logic;
    00:23:18 - Linking the builder NPM package with the target project (npm link);
    00:27:53 - Feature 1 - Patching the build info;
    00:34:10 - Feature 2 - Builder customization using options;
    00:37:45 - Feature 3 - Schedule other targets from the builder;
    00:43:33 - How it works with configurations (dev, prod, etc);
    00:45:50 - Quick Recap;
    00:49:36 - Outro & Announcements;
    🔗 Project Code on GitHub:
    github.com/DMezhenskyi/custom...
    🙌 Support Dmytro bit.ly/donate-to-decoded-fron...
    💡 Short Frontend Snacks (Tips) every week here:
    Twitter - / decodedfrontend
    Instagram - / decodedfrontend
    LinkedIn - / dmezhenskyi
    #angularcli #ng #angular15 #angular14 #webdevelopment #decodedfrontend
  • Jak na to + styl

Komentáře • 51

  • @DecodedFrontend
    @DecodedFrontend  Před rokem +3

    This video became quite long but I wanted to show you every possible aspect of custom builder creation that you might face implementing your own one. If you like my videos you can support my channel by sharing this video and subscribing to my other Social Media where I publish short frontend tips:
    Twitter - twitter.com/DecodedFrontend
    Instagram - instagram.com/decodedfrontend
    LinkedIn - www.linkedin.com/in/dmezhenskyi

  • @ratikagrawal12
    @ratikagrawal12 Před rokem +10

    I joined this channel when it had only 100 subscribers, the content here has been always mind boggling.

    • @DecodedFrontend
      @DecodedFrontend  Před rokem

      I am happy to hear that! Thanks for staying with me :)

  • @DuzyKucyk22
    @DuzyKucyk22 Před rokem

    Another unique video. I find it entertaining when you present the whole process and logic. These are very useful.
    Keep up the great work you do!

  • @demidovmaxim1008
    @demidovmaxim1008 Před rokem

    The best channel about Angular. Thank you !

  • @MP3D2Y
    @MP3D2Y Před rokem

    Nice topic ! I was on vacation for Christmas and had not taken the time to watch this video until now

  • @frontend3409
    @frontend3409 Před rokem

    "So this is the place where builder logic lives" - with that kind of vocabulary you're totally buying me. Unlike other angular/ts youtubers you can talk about complicated things in a way that everyone will understand. And Quick recap at the end shows that it is complicated topic! At the end of this video i've had a feeling like "whoa, it's easy, but there are a lot of steps which you have to do". Complicated topic, but greatly and easily explained. It's not about running and creating a builder but about mocking npm package, too.
    At the beginning of the week i didn't think i will be doing some custom builder, but now i'm think about that it can be applied at my work.
    The only disadvantage i would say is where you're showing the terminal at the bottom of the video, the subtitles are covering it, but subs can be easily moved on yt, so... it's not a critical error :)
    Great tutorial. Please, do not stop creating content. Tremendous video.
    And i think we need a video about Angular Elements from your side. Thank you. For all.

  • @junaidsarfraz6841
    @junaidsarfraz6841 Před rokem +3

    Great as always. Can you make a video on structuring the Angular app and the best practices, especially after the standalone components release?

  • @nourway3639
    @nourway3639 Před 5 měsíci

    Very cool man, keep it up 👏

  • @ansumanmishra9608
    @ansumanmishra9608 Před rokem

    Excellent explanation!! Keep up the good work 👍

  • @oleksandrvorovchenko8674

    Thanks for the detailed explanation!

  • @lukamilosevic3166
    @lukamilosevic3166 Před rokem +1

    Thanks Dmytro amazing content ! Thanks again for making advanced Angular topics accessible to all 😁

  • @RysioACF
    @RysioACF Před rokem

    Pretty sweet video, thanks.

  • @dearvivekkumar
    @dearvivekkumar Před rokem +1

    Most awaited....

  • @_dinesh
    @_dinesh Před 6 měsíci

    Nice video! thanks! ❤

  • @igorparampam5984
    @igorparampam5984 Před 8 měsíci

    great material!

  • @sezarmbar
    @sezarmbar Před 8 měsíci

    very good video, lots of useful information thanks

  • @balajibalamurugan8053
    @balajibalamurugan8053 Před rokem +1

    Awesome as always ✨🥰

  • @aaronkoller8811
    @aaronkoller8811 Před rokem +1

    Wow,. So much good info. this is especially useful for multi-environment release pipelines where you need to inject different variables depending on the environment

  • @ihoryanovchyk
    @ihoryanovchyk Před rokem +2

    Дякую, козаче!

  • @dearvivekkumar
    @dearvivekkumar Před rokem +1

    Thanks a ton for creating amazing video

  • @mariademchenko7361
    @mariademchenko7361 Před rokem

    Awesome tutorial, thank you.
    Do you happen to have a video that covers bootstrapping of an angular app as a part of module federation under the hood? How does the bootstrapping change in different ng versions?

  • @oleksandrvorovchenko8674

    Thanks!

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +1

      Wow, Thanks a lot for your support! Much appreciate it! :)

  • @MrVinodkumar92
    @MrVinodkumar92 Před 4 měsíci +1

    Hi bro. Your are truly amazing in explaining the concepts in deeper.
    Can you explain how to debug custom builder with dev tools or vs code. This helps us to debug existing custom builder on our project and enhance to support other features. Thanks in advance.
    Looking forward a reply from you.

  • @aram5642
    @aram5642 Před 5 měsíci

    An excellent tutorial! Thank you so much for sharing. Just one question: what needs to be done around the schema, so that these two options (target2run, file2patch) come up as intellisense suggestions?

  • @channelnoraa
    @channelnoraa Před rokem +1

    Thanks bro.

  • @thirukumaran6034
    @thirukumaran6034 Před rokem

    Thank you ❤. It's a very useful session and explained step by step. Is it possible to run a typescript transformer as part of an angular compilation process as part of custom builder

  • @vladpoezzhaev4616
    @vladpoezzhaev4616 Před rokem

    Hello, Dmytro!
    Thank you for informative explanation of interesting topic :)
    I have one question. I use nx, but it should not be reason...
    When I use scheduleTarget for the serve target in my app, it working good but after successful execution it complete target. It means that it's stopping server. What's the reason it could be?
    Thank you again.

  • @nathanwilcox8395
    @nathanwilcox8395 Před rokem +1

    How would you go about writing test coverage for a custom builder

  • @pollo_cesar_
    @pollo_cesar_ Před rokem

    Always great content that is really useful in real life projects, thanks for the work. I have a question, there is a way to pass the options object when running the builder, with ng run?

    • @pollo_cesar_
      @pollo_cesar_ Před rokem

      Never mind, I found it in the docs of angular, thanks again for great content

  • @only-exlight
    @only-exlight Před rokem

    Thanks for video. It helped me.
    I try to create builder, which can run tasks by chain. Last task, in my case it is 'serve'. When I try to run my task chain, the serve command run once and finished.
    Builder is very simple - it is cycle "for", where running tasks. The result of the last task will be return from builder function.
    Any help by topic, thx.

  • @rudrapanda117
    @rudrapanda117 Před rokem

    Can you please add module federation to your amazing playlist also?

  • @onetwothree123-
    @onetwothree123- Před 24 dny

    For such simple scenarios imo we don't need even to write custom builder, the code can be placed right in the project, however thanks for the video it allow to understand how things work under the hood

  • @olaosman7520
    @olaosman7520 Před rokem

    I work with angular since tow years and still can't understand this level,, what should i learn or work to be in this advance level?

  • @028-manikandan3
    @028-manikandan3 Před rokem

    Sir please put video angular crud operation sir 🙏🙏🙏

  • @dimitridovgan6364
    @dimitridovgan6364 Před rokem +1

    Hi Dmytro,
    thank you very much for the video!
    Are you planning any commercial video courses for advanced ngRx applications? I'm very interested in this topic.
    Thank you! 🇺🇦

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +1

      Hi 👋🏻 I don’t know yet :) in the beginning of 2023 I will create a quiz regarding the next course and let’s see how people will vote. P.s NgRx is one of the topics.

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +1

      But you can still reach me with your suggestions and use cases that you would like to see in the course :)

  • @culttm
    @culttm Před rokem

    What about a real project? Maybe the example of one with your experience would be a nice content!

  • @devman5813
    @devman5813 Před rokem +2

    What's the real usage of Angular Builders?

    • @DecodedFrontend
      @DecodedFrontend  Před rokem +2

      The use case from the video is quite a real one. Also, there are builders that allow you to build applications using a custom webpack config or run alternative test runners e.g Jest. There are a lot of use cases.

    • @devman5813
      @devman5813 Před rokem

      @@DecodedFrontend Thanks you, need to add a bookmark and see it later on :D