blueimp / JavaScript-Load-Image

Load images provided as File or Blob objects or via URL. Retrieve an optionally scaled, cropped or rotated HTML img or canvas element. Use methods to parse image metadata to extract IPTC and Exif tags as well as embedded thumbnail images, to overwrite the Exif Orientation value and to restore the complete image header after resizing.
https://blueimp.github.io/JavaScript-Load-Image/
MIT License
4.45k stars 924 forks source link

Name AMD modules to support loading multiple ones from minified bundle #66

Closed fredrikekelund closed 9 years ago

fredrikekelund commented 9 years ago

When the entire minified bundle (load-image.all.min.js) is loaded with require.js, require.js has no concept of which of the modules in that file is which unless we explicitly provide names for them. The developer still needs to tell require.js that this file contains all of the referenced modules though, so I added a note about that in the README.

blueimp commented 9 years ago

The minified file is just provided as a convenience. For most projects, the source files should be used individually and the project build process should handle minification of all JS assets. Therefore I don't see a need to use named modules, as developers who use RequireJS should use the individual source files and will probably use the RequireJS optimizer (r.js) to bundle their assets.