codesuki / react-d3-components

D3 Components for React
http://codesuki.github.io/react-d3-components/example.html
MIT License
1.63k stars 206 forks source link

export all components #99

Closed jacobboon closed 6 years ago

jacobboon commented 7 years ago

Hi!

I'm using this neat package in a current project, but I would like to seriously extend the functionality of some of the charts. I came to find it would be really convenient if all the components are exposed separately, so each can be imported as required. (Like for instance a Chart or a single Axis.)

Cheers, Jake

sorccu commented 7 years ago

I don't think including the lib folder is a very good idea. It will get out of sync for sure since you'd have to update it on pretty much every commit. Perhaps if you could elaborate a bit more on your use case an alternative solution could be found.

codesuki commented 7 years ago

Hi there! Thanks for the pullreq and sorry for the late reaction. I like that you exported the components one by one. But I don't understand why you would add the lib folder to git. Could you explain that to me? Maybe we could just add the separate components for /src and remove /lib again. Let's discuss this :)

solomein commented 7 years ago

Apparently /lib was included to allow the npm installation from fork. In this case, it was necessary to create another branch.

Also, the correct way is to publish your fork to npm as a scoped package @yourname/project

codesuki commented 7 years ago

Probably as discussed here: https://discuss.reactjs.org/t/best-way-to-include-a-react-fork-in-my-project/313

@solomein do you agree with removing the /lib folder from this PR?

solomein commented 7 years ago

@codesuki yes 👍

codesuki commented 7 years ago

@solomein thanks! cool avatar btw!

@jacobboon would you mind amending the pr? :)