mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[ESM] Convert the external/importL10n
-folder to use standard modules
This commit is contained in:
parent
5696c3aa3a
commit
a650fcd634
3 changed files with 10 additions and 16 deletions
|
@ -1880,7 +1880,7 @@ gulp.task("lint", function (done) {
|
|||
const esLintOptions = [
|
||||
"node_modules/eslint/bin/eslint",
|
||||
"--ext",
|
||||
".js,.jsm,.json",
|
||||
".js,.jsm,.mjs,.json",
|
||||
".",
|
||||
"--report-unused-disable-directives",
|
||||
];
|
||||
|
@ -2004,8 +2004,8 @@ gulp.task("clean", function (done) {
|
|||
rimraf(BUILD_DIR, done);
|
||||
});
|
||||
|
||||
gulp.task("importl10n", function (done) {
|
||||
const locales = require("./external/importL10n/locales.js");
|
||||
gulp.task("importl10n", async function () {
|
||||
const { downloadL10n } = await import("./external/importL10n/locales.mjs");
|
||||
|
||||
console.log();
|
||||
console.log("### Importing translations from mozilla-central");
|
||||
|
@ -2013,7 +2013,7 @@ gulp.task("importl10n", function (done) {
|
|||
if (!fs.existsSync(L10N_DIR)) {
|
||||
fs.mkdirSync(L10N_DIR);
|
||||
}
|
||||
locales.downloadL10n(L10N_DIR, done);
|
||||
await downloadL10n(L10N_DIR);
|
||||
});
|
||||
|
||||
function ghPagesPrepare() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue