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,23 +13,8 @@
* limitations under the License.
*/
'use strict';
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('pdfjs/core/ps_parser', ['exports', 'pdfjs/shared/util',
'pdfjs/core/primitives'], factory);
} else if (typeof exports !== 'undefined') {
factory(exports, require('../shared/util.js'), require('./primitives.js'));
} else {
factory((root.pdfjsCorePsParser = {}), root.pdfjsSharedUtil,
root.pdfjsCorePrimitives);
}
}(this, function (exports, sharedUtil, corePrimitives) {
var error = sharedUtil.error;
var isSpace = sharedUtil.isSpace;
var EOF = corePrimitives.EOF;
import { error, isSpace } from '../shared/util';
import { EOF } from './primitives';
var PostScriptParser = (function PostScriptParserClosure() {
function PostScriptParser(lexer) {
@ -234,6 +219,7 @@ var PostScriptLexer = (function PostScriptLexerClosure() {
return PostScriptLexer;
})();
exports.PostScriptLexer = PostScriptLexer;
exports.PostScriptParser = PostScriptParser;
}));
export {
PostScriptLexer,
PostScriptParser,
};