Skip to content
Myr

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 file

Take it

feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d

lines 1–27why, one step back
1/* eslint-disable @typescript-eslint/ban-ts-comment */
2import { toSSG as baseToSSG } from 'hono/ssg'3import type { FileSystemModule, ToSSGAdaptorInterface } from 'hono/ssg'45// @ts-ignore6const { write } = Bun78/**9 * @experimental10 * `bunFileSystemModule` is an experimental feature.11 * The API might be changed.12 */13export const bunFileSystemModule: FileSystemModule = {14 writeFile: async (path, data) => {15 await write(path, data)16 },17 mkdir: async () => {},18}1920/**21 * @experimental22 * `toSSG` is an experimental feature.23 * The API might be changed.24 */25export const toSSG: ToSSGAdaptorInterface = async (app, options) => {26 return baseToSSG(app, bunFileSystemModule, options)27}