CreateJS/EaselJS — pull request #260 by drkibitz (2013-02-16 08:05:08+00:00)
Title: First pass at EaselJS commonjs/node/npm support

I really don't think this is finished, but it is indeed functional.
You can actually test it out yourself. Go ahead and go into the node REPL, and do this:

```javascript
var easeljs = require('./src/common')(function () {
return {
getContext: function () {
return {}
}
}
});;
```

What you pass there is just a Mock to createCanvas. I force createCanvas to be required if loaded without a document global. When running in node I just wanted to experiment to see if I could actually do something with this project https://github.com/LearnBoost/node-canvas, but haven't gotten that far yet.

I don't really like forcing an initializing phase, and it doesn't need to do this when canvas is available, but it was quick and dirty for now without making any changes to the actual code base. I just wanted to get thoughts and opinions on it first.

My ultimate goal was to see if I could use [Closure Compiler's commonjs options](http://www.nonblocking.io/2011/12/experimental-support-for-common-js-and.html) to compile a build, but also use modules for development in the browser without needing a compile with many of the module libraries out there now. This doesn't look like it's going happening without making changes :/

My belief is that if the dependencies were defined as modules (and installable through npm), and Closure Compiler would actually make it through a build like this, it would be bring a number of more developers to the project.