superjoe30/node-minecraft-protocol — pull request #71 by deathcap (2014-01-07 05:19:02+00:00)
Title: Add browserify support

I wanted to use node-minecraft-protocol in the web browser via [browserify](http://browserify.org/), but it fails because of the ursa native library dependency:

Error: module "../bin/ursaNative" not found from "node-minecraft-protocol/node_modules/ursa/lib/ursa.js"

So I added a browser-specific module entry point, which does not include any ursa-dependent functionality. This means auth/crypto/etc is unavailable in this environment, but you can still encode and decode packets.

(@roblabla has been working on replacing [ursa](https://github.com/Obvious/ursa) with [Forge](https://github.com/digitalbazaar/forge), pure JavaScript: https://github.com/roblabla/node-minecraft-protocol/tree/feature-purejsrsa-forge - which could also solve this unbrowserifyable natives problem. But at least for my purposes, only including lib/protocol when browserified was sufficient. Didn't need any of the decryption functionality.)