ProgerXP / FileDrop

Self-contained cross-browser pure JavaScript class for Drag & Drop and AJAX (multi) file upload.
filedropjs.org
The Unlicense
264 stars 61 forks source link

Make UMD compatible #34

Closed willdady closed 9 years ago

willdady commented 9 years ago

I'd like to use FileDrop in a commonjs environment, specifically Browserify. I tried the following expecting it to work:

var FileDrop = require('filedrop');

however this simply returns an empty object. It appears FileDrop only attaches itself to window and doesn't follow any modern module pattern (AMD or CommonJS). By making this library UMD compatible you will only need to expose FileDrop in the global scope if running in a non AMD or non CommonJS environment.

ProgerXP commented 9 years ago

Thanks for pointing this out. This should be fixed now, please test and close the ticket if it is.