Skip to content
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

Depend only on necessary d3 modules #409

Closed
wants to merge 1 commit into from
Closed

Depend only on necessary d3 modules #409

wants to merge 1 commit into from

Conversation

TomerAberbach
Copy link

Currently, dagre-d3 depends on the entire d3 library, but it only directly uses exports from the d3-selection and d3-shape libraries. You can verify this by searching for "d3" in this repository and scoping to JavaScript files. The code uses d3.select, which belongs to the d3-selection library, and d3.curveLinear, which belongs to the d3-shape library.

This PR replaces dagre-d3's d3 dependency with the d3-selection and d3-shape dependencies, and as a result nearly halves the size of dagre-d3.min.js (from 708kB to 367kB).

@TomerAberbach
Copy link
Author

@lutzroeder, so apparently I deleted the fork I originally made this PR from. As a result I don't think I can resolve the conflicts.

However, I think you should have write access to this PR so if you're still interested in merging, then you could make the necessary changes for merging.

@tbo47
Copy link

tbo47 commented Jan 6, 2022

I ported the project to es6 and I accept contributions!
https://github.com/tbo47/dagre-es

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants