Create Angular Component Library and Publish to NPM in 2022 - bonus - Nx

  Рет қаралды 10,787

Techtacious

Techtacious

Күн бұрын

Пікірлер: 33
@jae5577
@jae5577 Жыл бұрын
Awesome tutorial very clear and concise explanation. Please do more tutorials on Angular and React please
@techtacious
@techtacious Жыл бұрын
Thank you! I'll definitely be putting up more videos on Angular and React soon. Please stay tuned :).
@dylanv.dmerwe5960
@dylanv.dmerwe5960 Жыл бұрын
Standalone components should also make this process much easier to understand :)
@RenierVeiga-su4sd
@RenierVeiga-su4sd Жыл бұрын
Best video on this topic. Would benefit from timestamps to segment the video.
@techtacious
@techtacious Жыл бұрын
Thank you! I'll make sure to add timestamps. Thanks for the suggestion!
@armaandhir
@armaandhir 2 жыл бұрын
This is so useful, Thanks.
@techtacious
@techtacious 2 жыл бұрын
Glad you found it useful. Thanks for watching!
@mostafavii
@mostafavii 8 ай бұрын
It was so helpful, thanks
@techtacious
@techtacious 8 ай бұрын
I'm glad I could help.
@TVishnuvardhanReddy
@TVishnuvardhanReddy 10 ай бұрын
Can you create a video on using the angular component library in React application inside nx worksapce ? or please reply me with any reference video links Thank you
@techtacious
@techtacious 10 ай бұрын
Hi there, you can't use Angular components in a React application.
@matheusjordan6031
@matheusjordan6031 Жыл бұрын
Thank you !
@techtacious
@techtacious Жыл бұрын
Thanks for watching!
@CrusaderMen
@CrusaderMen Жыл бұрын
Hi @Techtacious, Thank you for sharing your knowledge this is helpful!. I have a situation where I want to publish a library that depends on multiple libraries that not shared on npm. is it possible to do that without publishing every library? Thanks!
@techtacious
@techtacious Жыл бұрын
Hi, thanks for watching ! I believe you should still be able to publish the one library without needing to publish the non-npm libraries, as long as your npm library has access to the non-npm dependencies at build-time. The bundled package would have everything that it needs and wouldn't need to depend on NPM.
@kenlnetherland
@kenlnetherland 9 ай бұрын
Was there a build step in between somewhere? I had a mental disconnect going from the coding part to the "libs" folder.
@sahajarora2162
@sahajarora2162 9 ай бұрын
Hi, I'm not quite sure what part of the video you're talking about but to summarize what's happening: I've created a libs folder where I intend to store my libraries, in this case the component library. The library can be a regular angular app / package that contains components. If you create a fresh angular project for the component library, you will get a "build" script out of the box which you can run using the command "npm run build" to build the project (in this case the component library). I hope that helps.
@kenlnetherland
@kenlnetherland 9 ай бұрын
@rora2162Sorry for not getting back to this. I figured it out. It was my first packaged component so I was unaware of the conventions at the time. Was used to 'src/app' -> 'dist' convention
@dylanv.dmerwe5960
@dylanv.dmerwe5960 Жыл бұрын
Bit stuck on where to actually start. You're starting from having a monorepo already available - how would you start from blank for someone who wants to create a component lib?
@techtacious
@techtacious Жыл бұрын
Hi Dylan, You can create an directory for your component library and then run npm init to initialize it as an npm package. Npm would ask you a bunch of questions to know more about the package that you're creating. Once answered, you should have a package.json file ready in the directory. You can then start adding the required node dependencies (such as angular) and also your component code. Once you have that, you can follow the video to see how the library can be published to npm.
@ektasingh6635
@ektasingh6635 Жыл бұрын
just a question once you have published it the lib folder that you created can be removed now from your solution right?
@techtacious
@techtacious Жыл бұрын
I'm not sure if I understand your question correctly but I'll try to answer. The lib folder is the source code for the npm package (library) and if you want to keep maintaining / updating the library version in npm, you'd need the source code :) .
@tumultex
@tumultex 7 ай бұрын
is it possible to sell an angular component library with this method? If yes any advice on how? Cheers
@techtacious
@techtacious 6 ай бұрын
Yes it is. One way to do that is to use npm authentication and provide access to only those who buy your library (from whatever platform you sell it at). Once a user purchases your library, you can provide them with an access token for npm.
@tumultex
@tumultex 6 ай бұрын
@@techtacious thanks for your reply!
@VinitNeogi
@VinitNeogi Жыл бұрын
Using this approach with Nx can we consume packaged version of lib1 from npm in lib2, where lib1 and lib2 are part of same monorepo
@techtacious
@techtacious Жыл бұрын
Hi Vinit, yes I don't see a problem with that. Once deployed to npm, a library is independent and can be consumed in any node project, regardless of that package being in the same monorepo as the library itself.
@VinitNeogi
@VinitNeogi Жыл бұрын
@@techtacious thanks
@LarryBuntus
@LarryBuntus Жыл бұрын
Since this doesn't come with a git repo, does it mean you are paying for the organization account?
@techtacious
@techtacious Жыл бұрын
Are you referring to Nx ? If so, then the answer is No. I am not paying to use the basic (plenty) features of Nx.
@LarryBuntus
@LarryBuntus Жыл бұрын
@@techtacious no I mean Npm
@ShubhamKale-j9s
@ShubhamKale-j9s 10 ай бұрын
You are not publishing the library on npm, you are not installing it from the npm if i want to use my code in my single project then that is the sense to make that libraty
@techtacious
@techtacious 10 ай бұрын
Not sure what you mean but if you watch the video, you'll realize that I am publishing the library to the npm registry. It is installable by any project (or sub-project) that's interested in utilizing the library. Thanks for your comment.
How to create angular library and publish on npm?
9:48
AyyazTech
Рет қаралды 6 М.
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 8 МЛН
Releasing NPM libraries from a Nx monorepo
7:00
nivek
Рет қаралды 3,2 М.
Angular Library: Private NPM Package in Angular Using Verdaccio
14:02
Code Shots With Profanis
Рет қаралды 14 М.
How to make your own NPM package (Step-by-Step) 📦
16:46
Under Ctrl
Рет қаралды 35 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 101 МЛН
How to structure a JS/TS monorepo (From Zero to Turbo - Part 1)
11:58
How I published the WORST Angular component library
15:47
Joshua Morony
Рет қаралды 6 М.
Mastering NX Angular Monorepo: Simplify Development and Boost Productivity
11:46
Monsterlessons Academy
Рет қаралды 21 М.
My opinion on Angular 18 & React 19
9:47
Maximilian Schwarzmüller
Рет қаралды 64 М.
Nx Conf 2022 - Make Nx Work for You with Custom Generators
25:18
Nx - Smart Monorepos - Fast CI
Рет қаралды 6 М.
Build And Publish A React Component Library
24:02
PortEXE
Рет қаралды 106 М.