diff --git a/index.js b/index.js new file mode 100644 index 0000000..a6ae008 --- /dev/null +++ b/index.js @@ -0,0 +1,7 @@ +module.exports = require('./js/load-image'); + +require('./js/load-image-exif'); +require('./js/load-image-exif-map'); +require('./js/load-image-ios'); +require('./js/load-image-meta'); +require('./js/load-image-orientation'); diff --git a/js/load-image-exif-map.js b/js/load-image-exif-map.js index f96cbd9..7818650 100644 --- a/js/load-image-exif-map.js +++ b/js/load-image-exif-map.js @@ -18,7 +18,7 @@ 'use strict'; if (typeof define === 'function' && define.amd) { // Register as an anonymous AMD module: - define(['load-image', 'load-image-exif'], factory); + define(['./load-image', './load-image-exif'], factory); } else if (typeof module === 'object' && module.exports) { factory(require('./load-image'), require('./load-image-exif')); } else { diff --git a/js/load-image-exif.js b/js/load-image-exif.js index 6b56d1f..6e9bd69 100644 --- a/js/load-image-exif.js +++ b/js/load-image-exif.js @@ -15,7 +15,7 @@ 'use strict'; if (typeof define === 'function' && define.amd) { // Register as an anonymous AMD module: - define(['load-image', 'load-image-meta'], factory); + define(['./load-image', './load-image-meta'], factory); } else if (typeof module === 'object' && module.exports) { factory(require('./load-image'), require('./load-image-meta')); } else { diff --git a/js/load-image-ios.js b/js/load-image-ios.js index f12573e..0818d4b 100644 --- a/js/load-image-ios.js +++ b/js/load-image-ios.js @@ -19,7 +19,7 @@ 'use strict'; if (typeof define === 'function' && define.amd) { // Register as an anonymous AMD module: - define(['load-image'], factory); + define(['./load-image'], factory); } else if (typeof module === 'object' && module.exports) { factory(require('./load-image')); } else { diff --git a/js/load-image-meta.js b/js/load-image-meta.js index d64d4b4..e257d48 100644 --- a/js/load-image-meta.js +++ b/js/load-image-meta.js @@ -19,7 +19,7 @@ 'use strict'; if (typeof define === 'function' && define.amd) { // Register as an anonymous AMD module: - define(['load-image'], factory); + define(['./load-image'], factory); } else if (typeof module === 'object' && module.exports) { factory(require('./load-image')); } else { diff --git a/js/load-image-orientation.js b/js/load-image-orientation.js index 83c7675..370b091 100644 --- a/js/load-image-orientation.js +++ b/js/load-image-orientation.js @@ -15,7 +15,7 @@ 'use strict'; if (typeof define === 'function' && define.amd) { // Register as an anonymous AMD module: - define(['load-image'], factory); + define(['./load-image'], factory); } else if (typeof module === 'object' && module.exports) { factory(require('./load-image')); } else { diff --git a/package.json b/package.json index 4630a0b..45e0217 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "blueimp-load-image", "version": "2.1.0", + "main": "index.js", "title": "JavaScript Load Image", "description": "JavaScript Load Image is a library to load images provided as File or Blob objects or via URL. It returns an optionally scaled and/or cropped HTML img or canvas element. It also provides a method to parse image meta data to extract Exif tags and thumbnails and to restore the complete image header after resizing.", "keywords": [