kangax/fabric.js — pull request #808 by drewlustro (2013-08-26 13:40:34+00:00)
Title: require.js support added via the "requirejs" cmd-line build option

**requirejs support**
As a demo, `build.sh` will always build dist/all.requirejs.js
Tests only mildly fail (5 total) on text rendering a couple pixels off.
I suspect it's because I'm running the tests on OS X and my
libs are just slightly different than yours. I cannot seem
to convince the test suite environment / scoping to play nicely with the
requirejs version, though.

References of "AMD" in `build.sh` just try to make the code
intend that more libraries will be supported.

**demo requirejs compatible version**
```bash
fabric.js/dist/all.requirejs.js
```

**make all*.js requirejs compatible**
```bash
$ node build modules=ALL requirejs
```

---

Test results from normal build:
```bash
$ node build modules=ALL exclude=json,cufon,gestures
$ node test
```

![screen shot 2013-08-26 at 9 33 40 am](https://f.cloud.github.com/assets/194885/1025963/4d6f22a2-0e54-11e3-9a4b-283702fd79e5.png)