GoodBoyDigital/pixi.js — pull request #1275 by bvalosek (2014-12-16 02:36:03+00:00)
Title: export stub when in node environment

This PR addresses the issue of requiring pixi in a node environment-- doing so will break due to e.g. references to `document` during module evaluation.

This normally isn't a problem, as running pixi outside of the browser doesn't make much sense.

However, if there is some shared code between client and server, or potential code that is evaluated to walk dependency graphs, then this is an issue.

### Changes

* Module now exports an empty object `{ }` by default inside of node environments
* The `browser` field in `package.json` now points to `bin/pixi.js`, like the `main` field used to, so tools like Browserify still work correctly