-
Notifications
You must be signed in to change notification settings - Fork 12k
Using angular-cli to generate a component library for angular 2 #3580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
have a look on that: http://www.dzurico.com/how-to-create-an-angular-library/ |
I asked a similar question here: #3277 |
Thanks for the links. It would be quite nice the creation of component libraries would be directly supported in angular-cli. Is such a feature planned? |
Hi I don't know if angular-cli will support that, and this is why I created it! The scss file are not just copied, if you open your component in the dist folder you'll see that it is inlined there, it means that has been converted in css inline and then is copied. |
Hi, thanks for you explanation! About the usage of |
As I said I didn't test with sass. It should works. Ng serve is just for angular-cli (a tool) what I did is not using cli because is not useful in this case |
Dupe of #1692. There's good discussion here don't get me wrong, but it's better to consolidate issues. |
We're in the process of making a simple command tool for generating libraries. You just pass the ts-file you want to be the entry point of the library:
and this creates a tar.gz that you may use directly with npm install. Currently only exporting FESM module which works for all our usages for reuse in other Angular projects. You can take a look here: |
@nikolasleblanc the article you pasted is good and ng-packagr is a good option, but it will be better to have this integrated in angular-cli. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm currently writing an web application for which I need to use a wizard component.
Because I couldn't find one that satisfies my requirements on the web I started to write my own wizard module based on some projects I found written for angular 1.
Now I want to move the files belonging to the wizard component in a new angular 2 project, to decouple it from my main project.
I already searched for a guide containing the information how to create a component library when I found this website describing how to create an angular 2 component library.
However because I'm not too knowledgeable about the angular 2 and javascript tool chains, and because the given guide doesn't use angular-cli, I'm asking here if someone can tell me how to create a component library for my wizard component and its module for angular 2 with angular-cli.
The text was updated successfully, but these errors were encountered: