1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38: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:
Jonas Jenwald 2017-04-02 16:14:30 +02:00
parent b66b705ed7
commit 982b6aa65b
34 changed files with 3504 additions and 4203 deletions

View file

@ -13,29 +13,9 @@
* limitations under the License.
*/
'use strict';
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('pdfjs/core/function', ['exports', 'pdfjs/shared/util',
'pdfjs/core/primitives', 'pdfjs/core/ps_parser'], factory);
} else if (typeof exports !== 'undefined') {
factory(exports, require('../shared/util.js'), require('./primitives.js'),
require('./ps_parser.js'));
} else {
factory((root.pdfjsCoreFunction = {}), root.pdfjsSharedUtil,
root.pdfjsCorePrimitives, root.pdfjsCorePsParser);
}
}(this, function (exports, sharedUtil, corePrimitives, corePsParser) {
var error = sharedUtil.error;
var info = sharedUtil.info;
var isArray = sharedUtil.isArray;
var isBool = sharedUtil.isBool;
var isDict = corePrimitives.isDict;
var isStream = corePrimitives.isStream;
var PostScriptLexer = corePsParser.PostScriptLexer;
var PostScriptParser = corePsParser.PostScriptParser;
import { error, info, isArray, isBool } from '../shared/util';
import { isDict, isStream } from './primitives';
import { PostScriptLexer, PostScriptParser } from './ps_parser';
var PDFFunction = (function PDFFunctionClosure() {
var CONSTRUCT_SAMPLED = 0;
@ -1152,8 +1132,9 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
return PostScriptCompiler;
})();
exports.isPDFFunction = isPDFFunction;
exports.PDFFunction = PDFFunction;
exports.PostScriptEvaluator = PostScriptEvaluator;
exports.PostScriptCompiler = PostScriptCompiler;
}));
export {
isPDFFunction,
PDFFunction,
PostScriptEvaluator,
PostScriptCompiler,
};