ssg.ts
This file
Path
src/adapter/bun/ssg.ts
29 lines 路 906 bytes 路 TypeScript
Last changed by
feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d
History of this fileTake it
123456789101112131415161718192021222324252627282930/* eslint-disable @typescript-eslint/ban-ts-comment */import { toSSG as baseToSSG } from '../../helper/ssg'import type { FileSystemModule, ToSSGAdaptorInterface } from '../../helper/ssg'
// @ts-ignoreconst { write } = Bun
/** * @experimental * `bunFileSystemModule` is an experimental feature. * The API might be changed. * @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead. */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. * @deprecated `hono/bun` will be removed in v5. Install `@hono/bun` and import from there instead. */export const toSSG: ToSSGAdaptorInterface = async (app, options) => { return baseToSSG(app, bunFileSystemModule, options)}