sonicnet.js
sonicnet.js copied to clipboard
standalone lib for use with vanilla js in the browser
This PR adjusts the Makefile to export the SonicServer, SonicSocket and SonicCoder under a global Sonicnet object attached to window. This is in addition to the dependency manager hooks which browserify exposes. See details about --standalone flag.
This fixes lib/api-test.html and makes it practical to consume the library in a browser in the absence of a dependency manager.
I wasn't able to find a solution to configure browserify to export the individual objects directly to window without explicitly changing lib/main.js as attempted in @mildmojo's PR.
This changes only the build in lib/. The Makefiles for the demos are left unchanged.
+1
@FalconerTC : Did you manage to make the plugin work ? I'm still having some trouble.
@Astriel It did work for me. What is the issue you are having?