Improve website DX sightly (#17940)

Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
Tatsunori Uchinoandfisker authored and GitHub committed 2025-09-23 17:39:18 +08:00
1 parent c9df58f5f9
commit 70ec01f41a
3 files changed
+12 -8

No files matched your search

+10 -7
View File
@@ -18,13 +18,16 @@ await fs.rm(STABLE_DOCS_DIRECTORY, { recursive: true, force: true });
await fs.mkdir(STABLE_DOCS_DIRECTORY, { recursive: true, force: true });
await fs.cp(CURRENT_DOCS_DIRECTORY, STABLE_DOCS_DIRECTORY, { recursive: true });
// Replace version placeholders
await Promise.all(
["browser.md"].map(async (file) => {
file = new URL(file, STABLE_DOCS_DIRECTORY);
await replaceVersionPlaceholder(file, version);
}),
);
// PRETTIER_VERSION when PULL_REQUEST exists is a temporary one
if (process.env.PULL_REQUEST !== "true") {
// Replace version placeholders
await Promise.all(
["browser.md"].map(async (file) => {
file = new URL(file, STABLE_DOCS_DIRECTORY);
await replaceVersionPlaceholder(file, version);
}),
);
}
async function getPrettierVersion() {
const version = process.env.PRETTIER_VERSION;