GoodBoyDigital/pixi.js — pull request #51 by CharlotteGore (2013-04-05 22:03:26+00:00)
Title: PIXI now wrapped in an anonymous function, with exports for CommonJS.

It'd be great if PIXI could be used as a [Component](https://github.com/component/component) so that it can be added to projects with the Component tooling with `component install GoodBoyDigital/pixi.js` and then used with `require('pixi')` At the moment I'm having to manually convert it into a CommonJS module and maintain it that way.

This pull request makes PIXI CommonJS friendly. It adds a tiny Intro and Outro file so that the whole of PIXI is wrapped in an anonymous function. There's also code to export PIXI as a module (for Component or other CommonJS implementations), or add PIXI to the global scope (which is what PIXI currently does).

I'll add the component.json file (to make it an installable component) as a separate pull request if this one is merged :). We'll probably need to update the built versions of the files in the repo soon, as Components work by downloading a specific file directly from Github.