palavatv/palava-client — pull request #10 by thammi (2014-09-04 20:02:19+00:00)
Title: CommonJS/npm/browserify

Makes the library loadable as CommonJS module/package. This adds support for [npm](https://www.npmjs.org/)/[browserify](http://browserify.org/) and their `require()` functions.

I had to add `palava = @palava` to the top of most files and `$ = @$` to the top of most files because we were depending on `this` being the global namespace (as a result of the way sprockets implements `#= require`).

Additionally there is now `module.coffee` which tries to load JQuery and EventEmitter with `require()` if they are not in the global namespace and exports the `palava` namespace.