jakiestfu/Medium.js — pull request #105 by DimitarChristoff (2014-10-30 17:35:23+00:00)
Title: AMD support

Addresses #104 but it's not a great solution as such - requires use of the relatively unknown `bundles` config in RequireJS which has been around since 2.1.11 only (at 2.1.15 now).

Creates 2 modules with ids `medium-wild` and `medium-domesticated` - requiring the domesticated without the shim for Undo and Rangy will fail, which is what you'd expect if you have not wired it all up.

Looking to the future, Undo does not seem updated much, chances of it getting proper AMD support are slim. Rangy can do with a tiny PR to make modules consistent by returning the object they decorate, which will make the following hack obsolete:

```javascript
define('medium-domesticated', ['undo', 'rangy/rangy-classapplier'], function(Undo) {
var rangy = require('rangy/rangy-core'); // resolved!
return factory(rangy, Undo);
});
```
and replaced by simply `define('medium-domesticated', ['undo', 'rangy/rangy-classapplier'], factory)`