sonicnet.js icon indicating copy to clipboard operation
sonicnet.js copied to clipboard

standalone lib for use with vanilla js in the browser

Open oslego opened this issue 10 years ago • 3 comments

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.

oslego avatar Oct 06 '15 15:10 oslego

+1

FalconerTC avatar Jan 20 '16 16:01 FalconerTC

@FalconerTC : Did you manage to make the plugin work ? I'm still having some trouble.

Astriel avatar Mar 22 '17 12:03 Astriel

@Astriel It did work for me. What is the issue you are having?

ramasubbaiya avatar Mar 28 '17 22:03 ramasubbaiya