angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Feat: add support for library development

Open msterba opened this issue 10 years ago • 5 comments

It would be nice to have support for developing component libraries.

Scaffolding could be done similar as for an app, having the app as playground for the library during development. ng build would then create tree-shakeable es6(es5) modules and an umd bundle. Of course without the app.

msterba avatar Oct 12 '16 16:10 msterba

it's quite difficult to find a standard way how to create an Angular2 library. I've been struggling for a while to be able to do this and so far I still can't create a component library which uses all Angular2 concepts (separated files for typescript, html templates, scss style files), and it's also quite hard to include in such a library images or stuff like that. This would really be great for all developpers in order to increase usage of Angular !

loicsalou avatar Oct 13 '16 11:10 loicsalou

I think a basic peace would be to have a away to generate a "valid" npm package to be used in other projects.

BernhardRode avatar Oct 13 '16 11:10 BernhardRode

cli could allow generation of projects that are not root projects. Like Maven it would be great to have a concept of Archetype so that:

"ng new myStockPicker --architype reusableComponentUI"
could generate a non root reusable UI component.

"ng new stockPricesPI --architype reusableComponentAPI" could generate an API that provides service capabilities.

"ng new stockApp " could generate the root module for the UI app, the way it does now.

vinaysoni avatar Oct 13 '16 13:10 vinaysoni

Dupe of https://github.com/angular/angular-cli/issues/1692

filipesilva avatar Oct 14 '16 22:10 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.