SuperAPI AI 工具集

schematics

编程与开发

查看项目

更新于 10-16 06:16

技能介绍

用途:该技能面向 Spartacus 的 Angular schematics 开发与测试,涵盖库的安装与迁移流程。

目录结构:核心安装与迁移 schematics 位于 core-libs/schematics/;版本相关迁移脚本在 core-libs/schematics/src/migrations/;共享工具在 core-libs/schematics/src/shared/;功能 schematics 配置在 core-libs/schematics/src/shared/lib-configs/;各功能库自带的安装 schematics 位于 <lib>/schematics/。

测试方式:核心 schematics 库可执行 cd core-libs/schematics && npm run test;全部库的 schematics 可执行 npm run test:all-schematics;单库(Jest)用 nx run :test-jest;指定测试文件用 nx run :test-jest --testPathPatterns=""。

技术说明:在 build/test 期间,feature-toggles.ts 会从 @spartacus/core 复制为 src/feature-toggles.copied-from-core-lib.ts(已 git 忽略),以避免直接依赖 @spartacus/core。

限制:资料未提供更细的功能清单、使用步骤与版本支持范围,暂未提供。