ssg.ts
This file
Path
adapters/bun/src/ssg.ts
27 lines 路 690 bytes 路 TypeScript
Last changed by
feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d
History of this fileTake it
12345678910111213141516171819202122232425262728/* eslint-disable @typescript-eslint/ban-ts-comment */import { toSSG as baseToSSG } from 'hono/ssg'import type { FileSystemModule, ToSSGAdaptorInterface } from 'hono/ssg'
// @ts-ignoreconst { write } = Bun
/** * @experimental * `bunFileSystemModule` is an experimental feature. * The API might be changed. */export const bunFileSystemModule: FileSystemModule = { writeFile: async (path, data) => { await write(path, data) }, mkdir: async () => {},}
/** * @experimental * `toSSG` is an experimental feature. * The API might be changed. */export const toSSG: ToSSGAdaptorInterface = async (app, options) => { return baseToSSG(app, bunFileSystemModule, options)}