import { Asset, IInitOptions, Resolver } from 'jgb-shared/lib'; import AwaitEventEmitter from 'jgb-shared/lib/awaitEventEmitter'; import WorkerFarm from 'jgb-shared/lib/workerfarm/WorkerFarm'; import Compiler from './Compiler'; import FSCache from './FSCache'; import PromiseQueue from './utils/PromiseQueue'; import Watcher from './Watcher'; export default class Core extends AwaitEventEmitter { private currentDir; private loadedAssets; private options; private entryFiles; buildQueue: PromiseQueue; resolver: Resolver; watcher: Watcher; compiler: Compiler; watchedAssets: Map; farm: WorkerFarm; cache: FSCache; hooks: Array<(...args: any[]) => Promise>; /** 使用core来output资源 */ useCoreOutput: boolean; constructor(options: IInitOptions); normalizeEntryFiles(): string[]; /** * 注入所需的环境变量 */ injectEnv(): void; normalizeOptions(options: IInitOptions): IInitOptions; initHook(): Promise; init(): Promise; start(): Promise; scan(): Promise; processAsset(asset: Asset, isRebuild?: boolean): Promise; getAsset(name: string, parent: string): Promise; resolveAsset(name: string, parent?: string): Promise; loadAsset(asset: Asset, cacheMiss?: boolean): Promise; resolveDep(asset: Asset, dep: any): Promise; getLoadedAsset(path: string): Asset; watch(path: string, asset: Asset): Promise; stop(): Promise; unwatch(path: string, asset: Asset): Promise; onChange(path: string): Promise; } export declare function aliasResolve(options: IInitOptions, root: string): IInitOptions['alias'];