checkpoint

This commit is contained in:
Jacky Zhao
2025-03-12 10:08:18 -07:00
parent 2718ab9019
commit 5d50282124
10 changed files with 179 additions and 178 deletions

View File

@@ -2,12 +2,13 @@ import path from "path"
import fs from "fs"
import { BuildCtx } from "../../util/ctx"
import { FilePath, FullSlug, joinSegments } from "../../util/path"
import { Readable } from "stream"
type WriteOptions = {
ctx: BuildCtx
slug: FullSlug
ext: `.${string}` | ""
content: string | Buffer
content: string | Buffer | Readable
}
export const write = async ({ ctx, slug, ext, content }: WriteOptions): Promise<FilePath> => {