import { Weshop, Wechat } from '../../typings/index'; export declare function executeAssemble(env: Weshop.Env, isDebug: boolean): Promise; /** * 将环境注入到 project 配置中 * @param env 环境变量 */ export declare function rewriteProjectConfig(env: Weshop.Env, debug: boolean): Promise; export declare function removeDependencies(packageDir: string): Promise; export declare function removeSubPackageFiles(packageDistDir: string): Promise; export declare function fixSubPackagePath(subPackageName: string, packageDistDir: string): Promise; /** * 修正相对路径 * @param fileContent 文本内容 * @param filePath 当前文件 */ export declare function fixRelativePath(fileContent: string, subPackageName: string, filePath: string): string; /** * 匹配到各个模块或页面/图片的绝对路径,若为非依赖项,则添加子包前缀 * @param fileContent string 文本内容 * @param filePath * @param subPackageName */ export declare function fixAbsolutePath(fileContent: string, subPackageName: string, filePath: string): Promise; export declare function fixPagePath(fileContent: string, subPackageName: string, filePath: string): Promise; export declare function fixImagePath(fileContent: string, subPackageName: string, filePath: string): Promise; export declare function fixJsPath(fileContent: string, subPackageName: string, filePath: string): Promise; export declare function fixWxssPath(fileContent: string, subPackageName: string, filePath: string): Promise; export declare function fixJsonPath(fileContent: string, subPackageName: string, filePath: string): Promise; /** * 根据正则表达式,修正模块路径(js/wxss 等) * @param pathRegx string 路径正则 * @param filePath string 文件路径 * @param fileContent string 文件内容 * @param packageName string 当前子包 */ export declare function fixModuleAbsolutePath(pathRegx: RegExp, fileContent: string, subPackageName: string, filePath: string): Promise; /** * 将子包的 app.json 和主包的 app.json 合并 * @param distDir 文件目录 * @param subPackageName 子包名 */ interface MainAppJson { content?: Wechat.AppJson; } export declare function mergeAppJson(mainAppJson: MainAppJson, distDir: string, subPackageName: string): Promise; /** * 子包处理 app.wxss * @param subPackageName 子包名 */ export declare function mergeAppWxss(subPackageName: string): Promise; /** * 将子包的 sub-app.js 内的 globalData 合并到 main-app.js 的 globalData 内 * @param subPackageName 子包名 */ interface MainGlobalData { content: Record; } export declare function mergeGlobalData(mainGlobalData: MainGlobalData, subPackageName: string): Promise; /** * 根据环境注入配置 * @param env 环境 */ export declare function setFileConfig(env?: Weshop.Env): Promise; /** * 替换页面内的主函数 * TODO 该地方简单使用正则处理 * @param cwd 项目路径 * @param wxFn */ export declare function replaceWxFn(cwd: string, wxFn: Weshop.wxFnConfig): Promise; export {}; //# sourceMappingURL=assemble.d.ts.map