htmlgaga
Version:
Manage non-SPA pages with webpack and React.js
49 lines (45 loc) • 1.73 kB
TypeScript
/**
* Copyright 2020-present, Sam Chen.
*
* Licensed under GPL-3.0-or-later
*
* This file is part of htmlgaga.
htmlgaga is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
htmlgaga is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with htmlgaga. If not, see <https://www.gnu.org/licenses/>.
*/
import webpack from 'webpack';
import Builder, { HtmlgagaConfig } from '../Builder';
export declare function generateManifest(seed: any, files: any, entrypoints: any): {
files: {
[key: string]: string;
};
entrypoints: {
[key: string]: string[];
};
};
export declare const ASSET_PATH: string;
declare class ProdBuilder extends Builder {
#private;
config: HtmlgagaConfig;
constructor(pagesDir: string, outputPath: string);
normalizedPageEntry(pagePath: string): string;
createWebpackConfig(pages: string[]): webpack.Configuration;
private runCallback;
private markEnd;
private markBegin;
private pageOrPages;
ssr(): Promise<void>;
run(): Promise<void>;
cleanCache(): void;
}
export default ProdBuilder;
export declare const exts = "mjs,js,jsx,ts,tsx,md,mdx";
export declare function searchPageEntry(pagePath: string, extList?: string): boolean;