Skip to main content

schematics

Use this skill when working with Spartacus schematics - Angular schematics for installing, configuring, and migrating Spartacus libraries. Trigger when the user mentions writing, debugging, or testing schematics, works with migration scripts or constructor/component deprecations, creates feature schematics configuration, adds new library installation schematics, tests schematics with verdaccio, or updates migrations.json or deprecation data files. Even if the user just mentions 'schematics', 'ng add', or 'ng update' in the context of Spartacus development, load this skill.

来源信息

仓库
SAP/spartacus
最近来源活动
2026年5月25日 16:44
检测到的 SKILL.md 语言
英语
星标
784
分支
418

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
schematics
description
Use this skill when working with Spartacus schematics - Angular schematics for installing, configuring, and migrating Spartacus libraries. Trigger when the user mentions writing, debugging, or testing schematics, works with migration scripts or constructor/component deprecations, creates feature schematics configuration, adds new library installation schematics, tests schematics with verdaccio, or updates migrations.json or deprecation data files. Even if the user just mentions 'schematics', 'ng add', or 'ng update' in the context of Spartacus development, load this skill.
# Spartacus Schematics Development This skill covers developing and testing Angular schematics for Spartacus library installation and migration. ## Directory Structure | Path | Purpose | |------|---------| | `core-libs/schematics/` | Main installation and migration schematics | | `core-libs/schematics/src/migrations/` | Version-specific migration scripts | | `core-libs/schematics/src/shared/` | Shared utilities | | `core-libs/schematics/src/shared/lib-configs/` | Feature schematics configurations | | `<lib>/schematics/` | Feature-specific installation schematics in each library | ## Testing Commands ```bash # Core Schematics lib cd core-libs/schematics && npm run test # All libs' schematics npm run test:all-schematics # Single library schematics (Jest) nx run <library-name>:test-jest # Specific test file nx run <library-name>:test-jest --testPathPatterns="<spec-filename>" ``` **Technical note**: During `build`/`test`, `feature-toggles.ts` is copied from `@spartacus/core` to `src/feature-toggles.copied-from-core-lib.ts` (git-ignored). This avoids direct dependency on `@spartacus/core`.
在 GitHub 查看