tomwanzek / d3-ng2-service

A D3 service for use with Angular.
MIT License
205 stars 42 forks source link

Can all non-essential d3 modules be moved to 'optional' dependencies. #103

Closed larssn closed 6 years ago

larssn commented 6 years ago

If the service isn't relying on them, I'd love to see them moved to optional dependencies. It would result in a smaller module footprint, since there's a lot of them.

https://docs.npmjs.com/files/package.json#optionaldependencies

tomwanzek commented 6 years ago

As it stands, the D3Service provides all modules in the package.json dependencies. By its very nature, it is closely aligned with the scope of the D3 standard bundle (minus d3-request plus d3-selection-multi).

Given the varied nature, of how D3 is used, there is no one size fits all smaller scope that will be generally useful.

The package was conceived as a way to rapidly prototype with D3 in Angular 2+ apps, for a minimal, tailored approach my recommendation would be to roll one's own service. The approach could mirror the one taken by d3-ng2-service.

I have deferred a major refactoring of this package until there is a more stable support for building and publishing Angular libraries. The tool chains and approaches to manage a third party library are still too varied to commit.