import { cliOptionsType, modeType, pkgType } from "../types"; import { ResovleConfig } from "../config"; import EMPShare from "../config/empShare"; declare class GlobalStore { /** * EMP Version * @default package version */ empPkg: pkgType; /** * 项目pkg信息 */ pkg: pkgType; /** * 项目根目录绝对路径 * @default process.cwd() */ root: string; /** * emp 内部根路径 * @default path.resolve(__dirname, '../../') */ empRoot: string; /** * emp 执行代码路径 */ empSource: string; /** * 项目配置 */ config: ResovleConfig; /** * 获取项目 根目录绝对路径 * (*) relativePath 可以是绝对路径 * @param relativePath * @returns */ resolve: (relativePath: string) => string; /** * 获取项目 emp内部根目录绝对路径 * @param relativePath * @returns */ empResolve: (relativePath: string) => string; /** * 源码地址 绝对路径 */ appSrc: string; /** * 源码生成目录 绝对路径 */ outDir: string; /** * 静态文件目录 绝对路径 */ publicDir: string; /** * 缓存目录 绝对路径 */ cacheDir: string; /** * 命令行变量 */ /** * 是否 ESM 模块 */ isESM: boolean; empShare: EMPShare; constructor(); /** * setConfig 设置全局配置 * @param mode webpack mode * @param cliOptions command options * @param pkg package.json data */ setup(mode: modeType, cliOptions: cliOptionsType, empPkg: any): Promise; private setAbsPaths; /** * 覆盖 config 配置 */ private setConfigByCliPotions; private setConfig; private checkAndSetReactVersion; } declare const _default: GlobalStore; export default _default;