UNPKG

five-server

Version:

Development Server with Live Reload Capability. (Maintained Fork of Live Server)

23 lines 1.07 kB
/** * @author Yannick Deubel (https://github.com/yandeu) * @copyright Copyright (c) 2021 Yannick Deubel * @license {@link https://github.com/yandeu/five-server/blob/main/LICENSE LICENSE} */ import type { NextFunction, Request, Response } from 'express6'; import { Writable } from 'stream'; export declare class Inject extends Writable { tags: any; code: any; size: number; chunks: Buffer[]; data: string; injectTag: string | boolean; constructor(tags: any, code: any); doInjection(data: string): void; _write(chunk: Buffer, encoding: BufferEncoding, callback: any): void; _final(callback: any): Promise<void>; } export declare const code: (filePath: string, baseURL: string, injectBodyOptions: boolean) => string; /** Injects the five-server script into the html page and converts the cache attributes. */ export declare const injectCode: (root: string, baseURL: string, PHP: any, injectBodyOptions: boolean) => (req: Request, res: Response, next: NextFunction) => Promise<any>; //# sourceMappingURL=injectCode.d.ts.map