soulwire/sketch.js — pull request #61 by JSteunou (2014-07-17 08:26:17+00:00)
Title: Add UMD support

Should fix #60

The diff seems pretty messy because of the re-indent. You should merge this one in very last.
To sum it up, all I did was wrapping Sketch around this.

```
(function (root, factory) {
if (typeof exports === 'object') {

// CommonJS like
module.exports = factory(root, root.document);

} else if (typeof define === 'function' && define.amd) {

// AMD
define(function() { return factory(root, root.document); });

} else {

// Browser global
root.Sketch = factory(root, root.document);

}

}(this, function (window, document) {

// old Sketch go re-indented here

return Sketch;

}));
```