firejsx
Version:
The React Framework for SSB, SSR and Serverless technologies
29 lines (28 loc) • 1.22 kB
TypeScript
import { $, WebpackConfig } from "../SSB";
import { Application } from "express";
export declare type initWebpack_Callback = (config: WebpackConfig) => void;
export declare type initServer_Callback = (server: Application) => void;
export declare type postExport_Callback = () => Promise<void>;
export declare type onBuild_Callback = (actions: onBuild_Actions) => Promise<void>;
export declare type dom_Callback = (html: string) => void;
export interface onBuild_Actions {
renderPage: (path: string, content?: any) => Promise<void>;
}
export interface Actions {
initServer: (callback: initServer_Callback) => void;
postExport: (callback: postExport_Callback) => void;
postRender: (page: string, callback: dom_Callback) => void;
initWebpack: (callback: initWebpack_Callback) => void;
onBuild: (page: string, callback: onBuild_Callback) => void;
}
export declare type Plugin = (actions: Actions, $: $) => Promise<void>;
export interface PageHooks {
postRender: dom_Callback[];
onBuild: onBuild_Callback[];
}
export interface GlobalHooks {
initWebpack: initWebpack_Callback[];
postRender: dom_Callback[];
initServer: initServer_Callback[];
postExport: postExport_Callback[];
}