configGenerator.d.ts 828 B

123456789101112131415161718192021222324
  1. interface GenerateInput {
  2. creativeId: string;
  3. theme: Record<string, string>;
  4. storageDir: string;
  5. }
  6. /**
  7. * 扫描用户素材目录,生成 _ad_config_.ts 内容。
  8. *
  9. * 关键逻辑:
  10. * - 必填素材 (config/page/map) → 必定 import
  11. * - optional 素材 (special) → 存在才 import,不存在则不生成对应字段
  12. * - 模板自有素材 → import 指向 templates/coloring/assets/
  13. */
  14. export declare function generateAdConfig(input: GenerateInput): string;
  15. /**
  16. * 创建 symlink:templates/coloring/assets/user/ → storage/creatives/<id>/assets/
  17. */
  18. export declare function createAssetsSymlink(creativeId: string, storageDir: string): void;
  19. /**
  20. * 清理构建产生的临时文件
  21. */
  22. export declare function cleanupBuildArtifacts(): void;
  23. export {};
  24. //# sourceMappingURL=configGenerator.d.ts.map