You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create wrapper library for easier working with js-ipfs-api, similar to cljs-web3.
Let's call it cljs-ipfs-api.
This lib should mainly do:
Split library into namespaces: For example ipfs.files.add function, will be in the lib as cljs-ipfs.files/add
Do clj->js on arguments passed into a functions
Do js->clj on objects returned from functions callbacks. Same as cljs-web3 does it.
In order to this lib to work, you'll likely need to create cljsjs/js-ipfs library. Alternative option would be to try to use new :npm-deps. It would be better, because of dead code elimination, but not sure if it's gonna work. You can give it a try.
Library should be usable in both, nodejs and browser.
As for documentation, you don't need to document every single function, since it's just a wrapper, just write something similar to cljs-web3 readme.
As for tests, no need to test every single function, just a few random, so we know cljs<->js conversions work.
The text was updated successfully, but these errors were encountered:
Create wrapper library for easier working with js-ipfs-api, similar to cljs-web3.
Let's call it
cljs-ipfs-api
.This lib should mainly do:
ipfs.files.add
function, will be in the lib ascljs-ipfs.files/add
clj->js
on arguments passed into a functionsjs->clj
on objects returned from functions callbacks. Same ascljs-web3
does it.In order to this lib to work, you'll likely need to create
cljsjs/js-ipfs
library. Alternative option would be to try to use new:npm-deps
. It would be better, because of dead code elimination, but not sure if it's gonna work. You can give it a try.Library should be usable in both, nodejs and browser.
As for documentation, you don't need to document every single function, since it's just a wrapper, just write something similar to
cljs-web3
readme.As for tests, no need to test every single function, just a few random, so we know cljs<->js conversions work.
The text was updated successfully, but these errors were encountered: