import { WatchOptions } from 'chokidar'; import { RouteConfig } from './defs'; import { ScanDirOptions } from './scanDir'; import { ToRouteOptions } from './toRoute'; export interface IConfig { /** Path of your convention routes root. */ pageRoot?: string; /** filter after all file was scanned */ filter?: ToRouteOptions['filter']; componentPath?: ToRouteOptions['componentPath']; extensions?: ToRouteOptions['extensions']; isLayout?: ToRouteOptions['isLayout']; routePath?: ToRouteOptions['routePath']; modifyRoutePath?: ToRouteOptions['modifyRoutePath']; childrenKey?: ToRouteOptions['childrenKey']; /** Regexp to match file fullpath */ includes?: ScanDirOptions['includes']; /** Regexp to ignore file fullpath */ excludes?: ScanDirOptions['excludes']; /** output template */ template?: string; /** output template file path, it will instead `config.template` */ templateFile?: string; /** Log tips when creation completed */ successTips?: string; /** output path */ output?: string | ((outputStr: string, templateStr: string) => void); /** modify routes finally */ modifyRoutes?: (routes: RouteConfig[]) => any; } export default function watchDir(config: IConfig & { watchOptions?: WatchOptions; }): void; export declare function scanRoutes(config: IConfig): Promise;