mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[ESM] Convert the "cmaps"-task to use import()
syntax
This commit is contained in:
parent
42edc4d895
commit
f012fc5e70
4 changed files with 20 additions and 14 deletions
|
@ -848,7 +848,7 @@ gulp.task("locale", function () {
|
|||
]);
|
||||
});
|
||||
|
||||
gulp.task("cmaps", function (done) {
|
||||
gulp.task("cmaps", async function () {
|
||||
const CMAP_INPUT = "external/cmaps";
|
||||
const VIEWER_CMAP_OUTPUT = "external/bcmaps";
|
||||
|
||||
|
@ -869,10 +869,10 @@ gulp.task("cmaps", function (done) {
|
|||
}
|
||||
});
|
||||
|
||||
const compressCmaps =
|
||||
require("./external/cmapscompress/compress.js").compressCmaps;
|
||||
const { compressCmaps } = await import(
|
||||
"./external/cmapscompress/compress.mjs"
|
||||
);
|
||||
compressCmaps(CMAP_INPUT, VIEWER_CMAP_OUTPUT, true);
|
||||
done();
|
||||
});
|
||||
|
||||
function preprocessCSS(source, defines) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue