summaryrefslogtreecommitdiffstats
path: root/remote/test/puppeteer/Herebyfile.mjs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--remote/test/puppeteer/Herebyfile.mjs33
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 [