@hadss/hmrouter-plugin
Version:
HMRouter Compiler Plugin
45 lines (44 loc) • 1.7 kB
TypeScript
import { HMRouterResult } from '../model';
export declare class HMRouterPluginConfig {
moduleName: string;
modulePath: string;
configDir: string;
scanDir: string[];
commonScanFullDir: string;
routerMapDir: string;
builderDir: string;
defaultPageTemplate: string;
customPageTemplate: CustomPageTemplateImpl[];
saveGeneratedFile: boolean;
autoObfuscation: boolean;
incremental: boolean;
constructor(moduleName: string, modulePath: string, configDir: string, param: HMRouterPluginConfigParam);
getScanPath(dir: string): string;
getRelativeSourcePath(filePath: string): string;
getRelativeShortSourcePath(analyzeResult: HMRouterResult): string;
getRelativeBuilderPath(filePath: string, relativeShortPath: string): string;
getGeneratedFilePath(relativeShortPath: string): string;
getBuilderDir(isDetele?: boolean): string;
getBuilderFilePath(relativeShortPath: string): string;
getRouterMapDir(isDetele?: boolean): string;
getDefaultRouterMapDir(): string;
getModuleRouterMapFilePath(routerMapFileName: string): string;
getRawFilePath(isDetele?: boolean): string;
getDefaultTplFilePath(): string;
getObfuscationFilePath(isDetele?: boolean): string;
getConsumerRulesFilePath(isDetele?: boolean): string;
}
export interface HMRouterPluginConfigParam {
scanDir?: string[];
routerMapDir?: string;
builderDir?: string;
autoObfuscation?: boolean;
saveGeneratedFile?: boolean;
defaultPageTemplate?: string;
customPageTemplate?: CustomPageTemplateImpl[];
incremental?: boolean;
}
export interface CustomPageTemplateImpl {
srcPath: string[];
templatePath: string;
}