mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Convert the files in the /web
folder to ES6 modules
Note that as discussed on IRC, this makes the viewer slightly slower to load *only* in `gulp server` mode, however the difference seem slight enough that I think it will be fine.
This commit is contained in:
parent
313060aff5
commit
3b35c15d42
32 changed files with 1585 additions and 2045 deletions
|
@ -13,24 +13,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs-web/annotation_layer_builder', ['exports',
|
||||
'pdfjs-web/ui_utils', 'pdfjs-web/pdf_link_service',
|
||||
'pdfjs-web/pdfjs'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('./ui_utils.js'),
|
||||
require('./pdf_link_service.js'), require('./pdfjs.js'));
|
||||
} else {
|
||||
factory((root.pdfjsWebAnnotationLayerBuilder = {}), root.pdfjsWebUIUtils,
|
||||
root.pdfjsWebPDFLinkService, root.pdfjsWebPDFJS);
|
||||
}
|
||||
}(this, function (exports, uiUtils, pdfLinkService, pdfjsLib) {
|
||||
|
||||
var mozL10n = uiUtils.mozL10n;
|
||||
var SimpleLinkService = pdfLinkService.SimpleLinkService;
|
||||
import * as pdfjsLib from 'pdfjs-web/pdfjs';
|
||||
import { mozL10n } from 'pdfjs-web/ui_utils';
|
||||
import { SimpleLinkService } from 'pdfjs-web/pdf_link_service';
|
||||
|
||||
/**
|
||||
* @typedef {Object} AnnotationLayerBuilderOptions
|
||||
|
@ -142,6 +127,7 @@ DefaultAnnotationLayerFactory.prototype = {
|
|||
}
|
||||
};
|
||||
|
||||
exports.AnnotationLayerBuilder = AnnotationLayerBuilder;
|
||||
exports.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory;
|
||||
}));
|
||||
export {
|
||||
AnnotationLayerBuilder,
|
||||
DefaultAnnotationLayerFactory,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue