desandro/imagesloaded — pull request #167 by eiriklv (2014-11-02 17:54:04+00:00)
Title: install bower dependencies on npm postinstall

The AMD/define option is used by default when using webpack, and it fails as the bower dependencies aren't installed.

This fixes it, but I'm not sure if its the best solution.

Another option could be to have the CommonJS option on top like this:

```js
/*global define: false, module: false, require: false */

if (typeof exports === 'object') {
// CommonJS
module.exports = factory(
window,
require('wolfy87-eventemitter'),
require('eventie')
);
} else if (typeof define === 'function' && define.amd) {
// AMD
define([
'eventEmitter/EventEmitter',
'eventie/eventie'
], function(EventEmitter, eventie) {
return factory(window, EventEmitter, eventie);
});
} else {
// browser global
window.imagesLoaded = factory(
window,
window.EventEmitter,
window.eventie
);
}
```