Travis now runs tests in the browser as well as node
in the dist folder, a minified browser build of the library is included
in the examples folder there are html files showing how to run ChluIPFS in the browser. They also act as tests since one of them is a service node, the other is a customer, and through the console you can submit reviews and they get replicated by the service node running in another tab just fine 😃
Some notes:
Travis uses firefox for the tests. This is what the IPFS guys are also doing as far as I know, because the only other choice is PhantomJS but it uses an old version of webkit and the libs we use aren't tested under it
the minified build does not include IPFS and OrbitDB, they have to be included separately. This was so that the build process was not overcomplicated, and because developers might use OrbitDB and IPFS for other things in the same app and not only ChluIPFS. Also, the minified build is about 90kb: including IPFS and OrbitDB makes it 500k if not more
the minified build is not used in the tests, instead a custom build is made. I don't think this is an issue though
Thanks to this we can finally easily tinker with the library in the browser 😀
This PR comes with big changes:
Some notes:
Thanks to this we can finally easily tinker with the library in the browser 😀