mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 08:39:02 +03:00
14 lines
416 B
TypeScript
14 lines
416 B
TypeScript
import { rm } from "node:fs/promises"
|
|
import path from "node:path"
|
|
import astro from "../astro.config"
|
|
|
|
const base = astro.base?.replace(/\/$/, "") ?? ""
|
|
const snapshots = `dist/client${base}/docs-index`
|
|
|
|
await Promise.all(
|
|
(await Array.fromAsync(new Bun.Glob("**/*.html").scan({ cwd: snapshots }))).map((file) =>
|
|
rm(path.join(`dist/client${base}/docs`, file)),
|
|
),
|
|
)
|
|
await rm(snapshots, { recursive: true })
|