ipfs-mini icon indicating copy to clipboard operation
ipfs-mini copied to clipboard

js-ipfs-api is now modular. Consider merging efforts?

Open daviddias opened this issue 8 years ago • 2 comments

Hi @SilentCicero! Really like what you demonstrated with this repo, it is true that some users might not need the whole js-ipfs-api bundle and therefore they can get a way reduced bundle size by just importing the functions they need.

With that in mind, @nunofmn went ahead and made js-ipfs-api modular, just like async or lodash, now you can require only the bundle you need with:

require('ipfs-api/src/bootstrap')

Or even, just require a function of the set with:

require('ipfs-api/object/patch/add-link')

This results in lot smaller bundle sizes, see the table: https://github.com/ipfs/js-ipfs-api/issues/584#issuecomment-324287492

And we are even going to make it smaller with: https://github.com/ipfs/js-ipfs-api/issues/522 once https://github.com/ipfs/go-ipfs/issues/4008 is released in go-ipfs 0.4.11.

Would you consider focusing efforts in js-ipfs-api and keep doing work to make each submodular as smaller as possible? This would save a ton of work from updating two client libraries and would add a lot more test coverage.

Let me know what you think :)

daviddias avatar Aug 23 '17 10:08 daviddias

@diasdavid heyo, certainly! We should talk. Can you message me on gitter? Apologies for the late reply.

SilentCicero avatar Sep 05 '17 22:09 SilentCicero

No problem. Just pinged you there :)

daviddias avatar Sep 06 '17 06:09 daviddias