diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /remote/test/puppeteer/Herebyfile.mjs | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'remote/test/puppeteer/Herebyfile.mjs')
-rw-r--r-- | remote/test/puppeteer/Herebyfile.mjs | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/remote/test/puppeteer/Herebyfile.mjs b/remote/test/puppeteer/Herebyfile.mjs index 30f9c75262..7b1e27958f 100644 --- a/remote/test/puppeteer/Herebyfile.mjs +++ b/remote/test/puppeteer/Herebyfile.mjs @@ -6,20 +6,20 @@ /* eslint-disable import/order */ -import {copyFile, readFile, writeFile} from 'fs/promises'; +import {readFile, writeFile} from 'fs/promises'; import {docgen, spliceIntoSection} from '@puppeteer/docgen'; import {execa} from 'execa'; import {task} from 'hereby'; import semver from 'semver'; -export const docsNgSchematicsTask = task({ - name: 'docs:ng-schematics', - run: async () => { - const readme = await readFile('packages/ng-schematics/README.md', 'utf-8'); - await writeFile('docs/integrations/ng-schematics.md', readme); - }, -}); +function addNoTocHeader(markdown) { + return `--- +hide_table_of_contents: true +--- + +${markdown}`; +} /** * This logic should match the one in `website/docusaurus.config.js`. @@ -34,10 +34,18 @@ function getApiUrl(version) { } } +export const docsNgSchematicsTask = task({ + name: 'docs:ng-schematics', + run: async () => { + const readme = await readFile('packages/ng-schematics/README.md', 'utf-8'); + await writeFile('docs/guides/ng-schematics.md', readme); + }, +}); + export const docsChromiumSupportTask = task({ - name: 'docs:chromium-support', + name: 'docs:supported-browsers', run: async () => { - const content = await readFile('docs/chromium-support.md', { + const content = await readFile('docs/supported-browsers.md', { encoding: 'utf8', }); const {versionsPerRelease} = await import('./versions.js'); @@ -61,7 +69,7 @@ export const docsChromiumSupportTask = task({ } } await writeFile( - 'docs/chromium-support.md', + 'docs/supported-browsers.md', spliceIntoSection('version', content, buffer.join('\n')) ); }, @@ -72,7 +80,8 @@ export const docsTask = task({ dependencies: [docsNgSchematicsTask, docsChromiumSupportTask], run: async () => { // Copy main page. - await copyFile('README.md', 'docs/index.md'); + const mainPage = await readFile('README.md', 'utf-8'); + await writeFile('docs/index.md', addNoTocHeader(mainPage)); // Generate documentation for (const [name, folder] of [ |