mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-11-30 16:37:18 +01:00
Replace Metalsmith with a docs gulp task
Render the four Markdown pages with Marked and Highlight.js, using a JavaScript template instead of Nunjucks. Preserve their heading IDs and relative URLs. Add `lint-docs` to `gulp lint` to check Markdown tokens, front matter keys, code languages, and remaining root-relative URLs in selected HTML attributes. Verified all four pages against the old Metalsmith output: parsed HTML matches after ignoring whitespace between elements.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
---
|
||||
title: API
|
||||
layout: layout.njk
|
||||
slug: api
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
title: Examples
|
||||
layout: layout.njk
|
||||
slug: examples
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
title: Getting Started
|
||||
layout: layout.njk
|
||||
slug: getting_started
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
title: Home
|
||||
layout: layout.njk
|
||||
slug: home
|
||||
---
|
||||
|
||||
|
||||
+9
-8
@@ -1,9 +1,9 @@
|
||||
<!doctype html>
|
||||
export default ({ contents, description, sitename, slug, title }) => `<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ sitename }} - {{ title }}</title>
|
||||
<title>${sitename} - ${title}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="{{ description }}">
|
||||
<meta name="description" content="${description}">
|
||||
<meta name="viewport" content="device-width, initial-scale=1.0">
|
||||
<script src="/js/jquery-3.7.1.min.js"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
@@ -22,16 +22,16 @@
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item {{ 'active' if slug == 'home' else '' }}">
|
||||
<li class="nav-item ${slug === "home" ? "active" : ""}">
|
||||
<a class="nav-link" href="/">Home</a>
|
||||
</li>
|
||||
<li class="nav-item {{ 'active' if slug == 'getting_started' else '' }}">
|
||||
<li class="nav-item ${slug === "getting_started" ? "active" : ""}">
|
||||
<a class="nav-link" href="/getting_started">Getting started</a>
|
||||
</li>
|
||||
<li class="nav-item {{ 'active' if slug == 'examples' else '' }}">
|
||||
<li class="nav-item ${slug === "examples" ? "active" : ""}">
|
||||
<a class="nav-link" href="/examples">Examples</a>
|
||||
</li>
|
||||
<li class="nav-item {{ 'active' if slug == 'api' else '' }}">
|
||||
<li class="nav-item ${slug === "api" ? "active" : ""}">
|
||||
<a class="nav-link" href="/api">API</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
@@ -43,7 +43,7 @@
|
||||
</nav>
|
||||
</header>
|
||||
<main class="container">
|
||||
{{ contents | safe }}
|
||||
${contents}
|
||||
</main>
|
||||
<footer>
|
||||
<p>© Mozilla and individual contributors</p>
|
||||
@@ -54,3 +54,4 @@
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
+142
-51
@@ -27,6 +27,7 @@ import {
|
||||
} from "./external/ccov/coverage_format.mjs";
|
||||
import { exec, execSync, spawn, spawnSync } from "child_process";
|
||||
import { finished, pipeline as runPipeline } from "stream/promises";
|
||||
import { Marked, TextRenderer } from "marked";
|
||||
import autoprefixer from "autoprefixer";
|
||||
import { buildPrefsSchema } from "./external/chromium/prefs.mjs";
|
||||
import crypto from "crypto";
|
||||
@@ -35,16 +36,13 @@ import gulp from "gulp";
|
||||
import hljs from "highlight.js";
|
||||
import istanbulCoverage from "istanbul-lib-coverage";
|
||||
import istanbulReportGenerator from "istanbul-reports";
|
||||
import layouts from "@metalsmith/layouts";
|
||||
import layout from "./docs/templates/layout.js";
|
||||
import libReport from "istanbul-lib-report";
|
||||
import markdown from "@metalsmith/markdown";
|
||||
import Metalsmith from "metalsmith";
|
||||
import ordered from "ordered-read-streams";
|
||||
import path from "path";
|
||||
import postcss from "gulp-postcss";
|
||||
import postcssDiscardComments from "postcss-discard-comments";
|
||||
import { preprocess } from "./external/builder/builder.mjs";
|
||||
import relative from "metalsmith-html-relative";
|
||||
import rename from "gulp-rename";
|
||||
import stream from "stream";
|
||||
import TerserPlugin from "terser-webpack-plugin";
|
||||
@@ -810,12 +808,6 @@ function checkDir(dirPath) {
|
||||
}
|
||||
}
|
||||
|
||||
function replaceInFile(filePath, find, replacement) {
|
||||
let content = fs.readFileSync(filePath).toString();
|
||||
content = content.replace(find, replacement);
|
||||
fs.writeFileSync(filePath, content);
|
||||
}
|
||||
|
||||
function getTempFile(prefix, suffix) {
|
||||
fs.mkdirSync(BUILD_DIR + "tmp/", { recursive: true });
|
||||
const bytes = crypto.randomBytes(6).toString("hex");
|
||||
@@ -3076,7 +3068,7 @@ gulp.task("lint", function (done) {
|
||||
return;
|
||||
}
|
||||
|
||||
gulp.series("lint-licenses", "lint-chmod", "lint-bom")(done);
|
||||
gulp.series("lint-licenses", "lint-chmod", "lint-bom", "lint-docs")(done);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3309,47 +3301,146 @@ function ghPagesPrepare() {
|
||||
]);
|
||||
}
|
||||
|
||||
gulp.task("metalsmith", async function () {
|
||||
return new Promise((resolve, reject) => {
|
||||
Metalsmith(__dirname)
|
||||
.source("docs/contents")
|
||||
.destination(GH_PAGES_DIR)
|
||||
.clean(false)
|
||||
.metadata({
|
||||
sitename: "PDF.js",
|
||||
siteurl: "https://mozilla.github.io/pdf.js",
|
||||
description:
|
||||
"A general-purpose, web standards-based platform for parsing and rendering PDFs.",
|
||||
})
|
||||
.use(
|
||||
markdown({
|
||||
engineOptions: {
|
||||
highlight: (code, language) =>
|
||||
hljs.highlight(code, { language }).value,
|
||||
},
|
||||
})
|
||||
)
|
||||
.use(
|
||||
layouts({
|
||||
directory: "docs/templates",
|
||||
pattern: "**",
|
||||
transform: "nunjucks",
|
||||
})
|
||||
)
|
||||
.use(relative())
|
||||
.build(error => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
return;
|
||||
const DOCS_DIR = "docs/contents/";
|
||||
|
||||
// Supported Markdown tokens. Check link rewriting and heading IDs before
|
||||
// adding more.
|
||||
const DOCS_MARKDOWN_TOKENS = new Set([
|
||||
"code",
|
||||
"codespan",
|
||||
"heading",
|
||||
"html",
|
||||
"link",
|
||||
"list",
|
||||
"list_item",
|
||||
"paragraph",
|
||||
"space",
|
||||
"text",
|
||||
]);
|
||||
|
||||
// Required page metadata.
|
||||
const DOCS_FRONT_MATTER_KEYS = ["slug", "title"];
|
||||
|
||||
/**
|
||||
* Return rendered HTML pages keyed by their output path.
|
||||
*/
|
||||
function renderDocs() {
|
||||
const metadata = {
|
||||
sitename: "PDF.js",
|
||||
description:
|
||||
"A general-purpose, web standards-based platform for parsing and rendering PDFs.",
|
||||
};
|
||||
const pages = new Map();
|
||||
// Plain text of the headings, without inline HTML, for their IDs.
|
||||
const headingTextRenderer = new TextRenderer();
|
||||
headingTextRenderer.html = () => "";
|
||||
|
||||
for (const file of fs.readdirSync(DOCS_DIR, { recursive: true })) {
|
||||
if (!file.endsWith(".md")) {
|
||||
continue;
|
||||
}
|
||||
const filePath = DOCS_DIR + file.replaceAll(path.sep, "/");
|
||||
const fail = message => {
|
||||
throw new Error(`${filePath}: ${message}`);
|
||||
};
|
||||
|
||||
const [, frontMatter, markdown] =
|
||||
/^---\n(.*?)\n---\n(.*)$/s.exec(fs.readFileSync(filePath, "utf8")) ??
|
||||
fail("missing front matter.");
|
||||
const data = {};
|
||||
for (const line of frontMatter.split("\n")) {
|
||||
const [, key, value] = /^(\w+): (.*)$/.exec(line) ?? [];
|
||||
if (!DOCS_FRONT_MATTER_KEYS.includes(key)) {
|
||||
fail(`unsupported front matter "${line}".`);
|
||||
}
|
||||
data[key] = value;
|
||||
}
|
||||
for (const key of DOCS_FRONT_MATTER_KEYS) {
|
||||
if (!(key in data)) {
|
||||
fail(`missing "${key}" in the front matter.`);
|
||||
}
|
||||
}
|
||||
|
||||
const ids = new Set();
|
||||
const marked = new Marked({
|
||||
renderer: {
|
||||
// Preserve existing heading IDs for links such as #download.
|
||||
heading({ depth, tokens }) {
|
||||
const slug = this.parser
|
||||
.parseInline(tokens, headingTextRenderer)
|
||||
.toLowerCase()
|
||||
.trim()
|
||||
.replaceAll(/[^\p{L}\p{N}\s_-]/gu, "")
|
||||
.replaceAll(/\s/g, "-");
|
||||
let id = slug;
|
||||
for (let i = 1; ids.has(id); i++) {
|
||||
id = `${slug}-${i}`;
|
||||
}
|
||||
ids.add(id);
|
||||
return `<h${depth} id="${id}">${this.parser.parseInline(tokens)}</h${depth}>\n`;
|
||||
},
|
||||
},
|
||||
walkTokens(token) {
|
||||
if (!DOCS_MARKDOWN_TOKENS.has(token.type)) {
|
||||
fail(`unsupported Markdown "${token.type}": "${token.raw}".`);
|
||||
}
|
||||
replaceInFile(
|
||||
`${GH_PAGES_DIR}/getting_started/index.html`,
|
||||
/STABLE_VERSION/g,
|
||||
config.stableVersion
|
||||
);
|
||||
resolve();
|
||||
});
|
||||
if (token.type === "code" && token.lang) {
|
||||
if (!hljs.getLanguage(token.lang)) {
|
||||
fail(`unsupported code language "${token.lang}".`);
|
||||
}
|
||||
token.text = hljs.highlight(token.text, {
|
||||
language: token.lang,
|
||||
}).value;
|
||||
token.escaped = true;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
const htmlFile = file.replace(/\.md$/, ".html").replaceAll(path.sep, "/");
|
||||
const dir = path.posix.dirname(htmlFile);
|
||||
const html = layout({
|
||||
...metadata,
|
||||
...data,
|
||||
contents: marked.parse(markdown),
|
||||
})
|
||||
// Rewrite quoted root-relative href/src URLs relative to this page.
|
||||
.replaceAll(
|
||||
/(\s(?:href|src)=)(["'])\/(?!\/)(.*?)\2/g,
|
||||
(_, prefix, quote, url) =>
|
||||
`${prefix}${quote}${path.posix.relative(dir, url) || "."}${quote}`
|
||||
)
|
||||
.replaceAll("STABLE_VERSION", config.stableVersion);
|
||||
|
||||
const absoluteURL =
|
||||
/\s(?:href|src|srcset|action|poster|data-src)=["']?\/(?!\/)[^\s>]*/.exec(
|
||||
html
|
||||
);
|
||||
if (absoluteURL) {
|
||||
fail(`unsupported absolute local URL:${absoluteURL[0]}`);
|
||||
}
|
||||
pages.set(htmlFile, html);
|
||||
}
|
||||
return pages;
|
||||
}
|
||||
|
||||
gulp.task("docs", function (done) {
|
||||
fs.cpSync(DOCS_DIR, GH_PAGES_DIR, {
|
||||
recursive: true,
|
||||
filter: src => !src.endsWith(".md"),
|
||||
});
|
||||
for (const [htmlFile, html] of renderDocs()) {
|
||||
fs.mkdirSync(path.dirname(GH_PAGES_DIR + htmlFile), { recursive: true });
|
||||
fs.writeFileSync(GH_PAGES_DIR + htmlFile, html);
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task("lint-docs", function (done) {
|
||||
console.log("\n### Checking the web site files");
|
||||
|
||||
renderDocs();
|
||||
console.log("files checked, no errors found");
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task(
|
||||
@@ -3360,7 +3451,7 @@ gulp.task(
|
||||
"internal-viewer",
|
||||
"jsdoc",
|
||||
ghPagesPrepare,
|
||||
"metalsmith"
|
||||
"docs"
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Generated
+18
-358
@@ -12,8 +12,6 @@
|
||||
"@eslint/json": "^2.1.0",
|
||||
"@fluent/bundle": "^0.19.1",
|
||||
"@fluent/dom": "^0.10.2",
|
||||
"@metalsmith/layouts": "^3.0.0",
|
||||
"@metalsmith/markdown": "^1.10.0",
|
||||
"@napi-rs/canvas": "^1.0.10",
|
||||
"@types/node": "^26.6.4",
|
||||
"autoprefixer": "^10.6.1",
|
||||
@@ -44,9 +42,7 @@
|
||||
"istanbul-reports": "^3.2.0",
|
||||
"jasmine": "^7.0.0",
|
||||
"jsdoc": "^4.0.5",
|
||||
"jstransformer-nunjucks": "^1.2.0",
|
||||
"metalsmith": "^2.7.0",
|
||||
"metalsmith-html-relative": "^2.0.13",
|
||||
"marked": "^18.1.0",
|
||||
"ordered-read-streams": "^2.0.0",
|
||||
"postcss": "^8.5.28",
|
||||
"postcss-discard-comments": "^9.0.6",
|
||||
@@ -3600,41 +3596,6 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@metalsmith/layouts": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@metalsmith/layouts/-/layouts-3.0.0.tgz",
|
||||
"integrity": "sha512-5rOquSdfdQ9Nx++4gEIOZ8BDV0NuudthgV+itIJK/wgGRrFsmq2+3xQrbsX94oY73+KPJA5h638IU7Qp1nmTpQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-utf8": "^0.2.1",
|
||||
"jstransformer": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.18.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"metalsmith": "^2.4.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@metalsmith/markdown": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@metalsmith/markdown/-/markdown-1.10.0.tgz",
|
||||
"integrity": "sha512-DudINS2a9TlYjAVoOpAxlXutyCd6w6pC85RdBmByvkJiYEna+1Qwo3Z2si622URum9saAyG8mGuknoLS0A6beg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dlv": "^1.1.3",
|
||||
"dset": "^3.1.2",
|
||||
"marked": "^4.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"metalsmith": "^2.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/canvas": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/canvas/-/canvas-1.0.10.tgz",
|
||||
@@ -4782,13 +4743,6 @@
|
||||
"dev": true,
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/a-sync-waterfall": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz",
|
||||
"integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
|
||||
@@ -5000,13 +4954,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/asap": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
|
||||
"integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/astral-regex": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
|
||||
@@ -5715,13 +5662,6 @@
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/co": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz",
|
||||
"integrity": "sha512-CQsjCRiNObI8AtTsNIBDRMQ4oMR83CzEswHYahClvul7gKk+lDQiOKv+5qh7LQWf5sh6jkZNispz/QlsZxyNgA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
@@ -5759,16 +5699,6 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
|
||||
"integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/comment-parser": {
|
||||
"version": "1.4.9",
|
||||
"resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.9.tgz",
|
||||
@@ -6012,16 +5942,6 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deepmerge": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/detect-file": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
|
||||
@@ -6065,13 +5985,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/dlv": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
|
||||
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dom-serializer": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
|
||||
@@ -6131,16 +6044,6 @@
|
||||
"url": "https://github.com/fb55/domutils?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/dset": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/dset/-/dset-3.1.4.tgz",
|
||||
"integrity": "sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/each-props": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/each-props/-/each-props-3.0.0.tgz",
|
||||
@@ -6836,19 +6739,6 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/extend-shallow": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
||||
"integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-extendable": "^0.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fancy-log": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-2.0.0.tgz",
|
||||
@@ -7483,22 +7373,6 @@
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/gray-matter": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz",
|
||||
"integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"js-yaml": "^3.13.1",
|
||||
"kind-of": "^6.0.2",
|
||||
"section-matter": "^1.0.0",
|
||||
"strip-bom-string": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/gulp": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/gulp/-/gulp-5.0.1.tgz",
|
||||
@@ -8051,16 +7925,6 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-extendable": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
|
||||
"integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
@@ -8137,13 +8001,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-promise": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
|
||||
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/is-relative": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
|
||||
@@ -8196,13 +8053,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-utf8": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
|
||||
"integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/is-valid-glob": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz",
|
||||
@@ -8668,6 +8518,19 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/jsdoc/node_modules/marked": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
|
||||
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"marked": "bin/marked.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
}
|
||||
},
|
||||
"node_modules/jsesc": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
|
||||
@@ -8715,30 +8578,6 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/jstransformer": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz",
|
||||
"integrity": "sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-promise": "^2.0.0",
|
||||
"promise": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/jstransformer-nunjucks": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/jstransformer-nunjucks/-/jstransformer-nunjucks-1.2.0.tgz",
|
||||
"integrity": "sha512-3v8+d486W538nJCMt6+MENHiqp18YIaUGKWAEt1Vu2rjo64ZBMLBUfOouKLGfMgamgjbQcRMpjMnrfu+bKTjJw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nunjucks": "^3.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/keyv": {
|
||||
"version": "5.6.0",
|
||||
"resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz",
|
||||
@@ -8885,13 +8724,6 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lodash.clonedeepwith": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.clonedeepwith/-/lodash.clonedeepwith-4.5.0.tgz",
|
||||
"integrity": "sha512-QRBRSxhbtsX1nc0baxSkkK5WlVTTm/s48DSukcGcWZwIyI8Zz+lB+kFiELJXtzfH4Aj6kMWQ1VWW4U5uUDgZMA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lodash.debounce": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||
@@ -9051,16 +8883,16 @@
|
||||
"license": "Python-2.0"
|
||||
},
|
||||
"node_modules/marked": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
|
||||
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
|
||||
"version": "18.1.0",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-18.1.0.tgz",
|
||||
"integrity": "sha512-PamYXWWWg2nboG3oX5Ffzpy3EFZROqZJK9hSlMmUnekp7TxPs5DcT95vwd46m73/exfKCRVMtgXoPMI4FEJL6w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"marked": "bin/marked.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
"node": ">= 20"
|
||||
}
|
||||
},
|
||||
"node_modules/mathml-tag-names": {
|
||||
@@ -9118,78 +8950,6 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/metalsmith": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/metalsmith/-/metalsmith-2.7.0.tgz",
|
||||
"integrity": "sha512-DkoXO1jz0UY+k1tj1LpxYLrN+jeGKBicbtsQYeYF8nX9QK4AGyGh4g421qsmEOGfZ02GjW1qxr1XP+8afwcTGQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chokidar": "^4.0.3",
|
||||
"commander": "^11.1.0",
|
||||
"debug": "^4.4.3",
|
||||
"gray-matter": "^4.0.3",
|
||||
"is-utf8": "~0.2.0",
|
||||
"lodash.clonedeepwith": "^4.5.0",
|
||||
"micromatch": "^4.0.5",
|
||||
"stat-mode": "^1.0.0",
|
||||
"ware": "^1.3.0"
|
||||
},
|
||||
"bin": {
|
||||
"metalsmith": "bin/metalsmith"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/metalsmith-html-relative": {
|
||||
"version": "2.0.13",
|
||||
"resolved": "https://registry.npmjs.org/metalsmith-html-relative/-/metalsmith-html-relative-2.0.13.tgz",
|
||||
"integrity": "sha512-jG6aVx5v1cL9/mY72qBknPPF+RZluOSim3zETDxJkQt6+Ejb/AyABmNUResNFwyfh4ZjBcAKxSXgid3PKANsfA==",
|
||||
"dev": true,
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"cheerio": "^1.2.0",
|
||||
"deepmerge": "^4.3.1",
|
||||
"minimatch": "^10.2.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.18.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"metalsmith": "^2.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/metalsmith/node_modules/chokidar": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
|
||||
"integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"readdirp": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.16.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/metalsmith/node_modules/readdirp": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
|
||||
"integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 14.18.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "individual",
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
@@ -9473,42 +9233,6 @@
|
||||
"url": "https://github.com/fb55/nth-check?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/nunjucks": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz",
|
||||
"integrity": "sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"a-sync-waterfall": "^1.0.0",
|
||||
"asap": "^2.0.3",
|
||||
"commander": "^5.1.0"
|
||||
},
|
||||
"bin": {
|
||||
"nunjucks-precompile": "bin/precompile"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.9.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"chokidar": "^3.3.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"chokidar": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/nunjucks/node_modules/commander": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
|
||||
"integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/object-deep-merge": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/object-deep-merge/-/object-deep-merge-2.0.1.tgz",
|
||||
@@ -10117,16 +9841,6 @@
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/promise": {
|
||||
"version": "7.3.1",
|
||||
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||
"integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asap": "~2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
||||
@@ -10661,20 +10375,6 @@
|
||||
"node": "^14.0.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/section-matter": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz",
|
||||
"integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"extend-shallow": "^2.0.1",
|
||||
"kind-of": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
@@ -10877,16 +10577,6 @@
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stat-mode": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-1.0.0.tgz",
|
||||
"integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/stream-composer": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/stream-composer/-/stream-composer-1.0.2.tgz",
|
||||
@@ -10984,16 +10674,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-bom-string": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz",
|
||||
"integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-indent": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.1.1.tgz",
|
||||
@@ -12436,16 +12116,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ware": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ware/-/ware-1.3.0.tgz",
|
||||
"integrity": "sha512-Y2HUDMktriUm+SR2gZWxlrszcgtXExlhQYZ8QJNYbl22jum00KIUcHJ/h/sdAXhWTJcbSkiMYN9Z2tWbWYSrrw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"wrap-fn": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/watchpack": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.2.tgz",
|
||||
@@ -12671,16 +12341,6 @@
|
||||
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/wrap-fn": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/wrap-fn/-/wrap-fn-0.1.5.tgz",
|
||||
"integrity": "sha512-xDLdGx0M8JQw9QDAC9s5NUxtg9MI09F6Vbxa2LYoSoCvzJnx2n81YMIfykmXEGsUvuLaxnblJTzhSOjUOX37ag==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"co": "3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
|
||||
+1
-5
@@ -7,8 +7,6 @@
|
||||
"@eslint/json": "^2.1.0",
|
||||
"@fluent/bundle": "^0.19.1",
|
||||
"@fluent/dom": "^0.10.2",
|
||||
"@metalsmith/layouts": "^3.0.0",
|
||||
"@metalsmith/markdown": "^1.10.0",
|
||||
"@napi-rs/canvas": "^1.0.10",
|
||||
"@types/node": "^26.6.4",
|
||||
"autoprefixer": "^10.6.1",
|
||||
@@ -39,9 +37,7 @@
|
||||
"istanbul-reports": "^3.2.0",
|
||||
"jasmine": "^7.0.0",
|
||||
"jsdoc": "^4.0.5",
|
||||
"jstransformer-nunjucks": "^1.2.0",
|
||||
"metalsmith": "^2.7.0",
|
||||
"metalsmith-html-relative": "^2.0.13",
|
||||
"marked": "^18.1.0",
|
||||
"ordered-read-streams": "^2.0.0",
|
||||
"postcss": "^8.5.28",
|
||||
"postcss-discard-comments": "^9.0.6",
|
||||
|
||||
Reference in New Issue
Block a user