mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Convert the files in the /src/core
folder to ES6 modules
Please note that the `glyphlist.js` and `unicode.js` files are converted to CommonJS modules instead, since Babel cannot handle files that large and they are thus excluded from transpilation.
This commit is contained in:
parent
b66b705ed7
commit
982b6aa65b
34 changed files with 3504 additions and 4203 deletions
|
@ -13,37 +13,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs/core/image', ['exports', 'pdfjs/shared/util',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/colorspace', 'pdfjs/core/stream',
|
||||
'pdfjs/core/jpx'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../shared/util.js'), require('./primitives.js'),
|
||||
require('./colorspace.js'), require('./stream.js'),
|
||||
require('./jpx.js'));
|
||||
} else {
|
||||
factory((root.pdfjsCoreImage = {}), root.pdfjsSharedUtil,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreColorSpace, root.pdfjsCoreStream,
|
||||
root.pdfjsCoreJpx);
|
||||
}
|
||||
}(this, function (exports, sharedUtil, corePrimitives, coreColorSpace,
|
||||
coreStream, coreJpx) {
|
||||
|
||||
var ImageKind = sharedUtil.ImageKind;
|
||||
var assert = sharedUtil.assert;
|
||||
var error = sharedUtil.error;
|
||||
var info = sharedUtil.info;
|
||||
var isArray = sharedUtil.isArray;
|
||||
var warn = sharedUtil.warn;
|
||||
var Name = corePrimitives.Name;
|
||||
var isStream = corePrimitives.isStream;
|
||||
var ColorSpace = coreColorSpace.ColorSpace;
|
||||
var DecodeStream = coreStream.DecodeStream;
|
||||
var JpegStream = coreStream.JpegStream;
|
||||
var JpxImage = coreJpx.JpxImage;
|
||||
import { assert, error, ImageKind, info, isArray, warn } from '../shared/util';
|
||||
import { DecodeStream, JpegStream } from './stream';
|
||||
import { isStream, Name } from './primitives';
|
||||
import { ColorSpace } from './colorspace';
|
||||
import { JpxImage } from './jpx';
|
||||
|
||||
var PDFImage = (function PDFImageClosure() {
|
||||
/**
|
||||
|
@ -664,5 +638,6 @@ var PDFImage = (function PDFImageClosure() {
|
|||
return PDFImage;
|
||||
})();
|
||||
|
||||
exports.PDFImage = PDFImage;
|
||||
}));
|
||||
export {
|
||||
PDFImage,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue