igniteui-cli
igniteui-cli copied to clipboard
Use proper dependency management when adding views to Web Component projects
Is your feature request related to a problem? Please describe.
Currently, each added view brings it's own component registration:
Thankfully, the Ignite UI Web Components method guards against repeat registers, but if this was the native one it'd throw.
The project also includes a bunch of packages by default, even though they may not be in use at all:
https://github.com/IgniteUI/igniteui-cli/blob/3c4fd09227c3671f7070c3b3fa364edcec7fbc00/packages/cli/templates/webcomponents/igc-ts/projects/empty/files/package.json#L24-L31
Describe the solution you'd like
To follow best practices and avoid overloading the project with hardcoded dependencies, the CLI should dynamically register components (without duplicating) as they are added and install respective packages if needed. Very similar to the Angular project behavior. Since there are (still) different registration pattern, the CLI will have to account for that.
Additional context
This might be a heavy on detail request and many of those we'll have to iron out further.
ATM for sure we'd need the functionality handling the various dependencies and their registration in the project to be publicly exposed, so it almost certainly needs to be baked into IgniteUIForWebComponentsTemplate.registerInProject