2026-05-08 13:35:00 +09:00
|
|
|
import { rmSync } from "node:fs"
|
2026-05-08 16:38:14 +09:00
|
|
|
import { execSync } from "node:child_process"
|
2026-05-08 13:35:00 +09:00
|
|
|
|
|
|
|
|
const buildCachePaths = [".next/cache/fetch-cache"]
|
2026-05-20 14:26:08 +09:00
|
|
|
const shouldClearFetchCache = process.env.OMO_WEB_CLEAR_FETCH_CACHE === "1"
|
2026-05-08 13:35:00 +09:00
|
|
|
|
2026-05-20 14:26:08 +09:00
|
|
|
if (shouldClearFetchCache) {
|
|
|
|
|
for (const filePath of buildCachePaths) {
|
|
|
|
|
rmSync(filePath, { force: true, recursive: true })
|
|
|
|
|
}
|
2026-05-08 13:35:00 +09:00
|
|
|
}
|
2026-05-08 16:38:14 +09:00
|
|
|
|
|
|
|
|
execSync("node ./scripts/generate-docs-content.mjs", { stdio: "inherit" })
|