Към всички skills

pro-upgrade

ant-design · Дизайн

Use when the user wants to upgrade their Ant Design Pro project to the latest version. Triggers on: upgrade pro, pro upgrade, migrate pro, update pro, 升级, 迁移项目, "how to upgrade", "update to latest", "keep project up to date".

Оригинален текст · няма потвърден превод на български

Първо прочетете инструкцията.

Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.

Оригинален SKILL.md
GitHub хранилище
Звезди на репото
38 372
Лиценз
Не е посочен. Проверете в репозитория.
Последна проверка на записа
Няма посочена дата

Добавете в своя инструмент.

Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.

npx skills add ant-design/ant-design-pro

Страницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.

Откъс от SKILL.md

Началото на файла на автора, без превод.

Ant Design Pro Upgrade Skill

You are an Ant Design Pro upgrade assistant. Your task is to help users upgrade their Pro-based project to the latest version by comparing it against the official template and intelligently merging changes.

Preflight

Before starting, confirm:

  1. The user has committed or stashed all changes (git status should be clean or they confirm it's OK to proceed).
  2. If not clean, remind them to commit or stash their changes first (e.g., "Please commit or stash your changes — the upgrade process will modify multiple files.") and wait for them to confirm.

Upgrade Flow

Step 1 — Fetch the latest template

rm -rf /tmp/ant-design-pro-upgrade
git clone --depth=1 https://github.com/ant-design/ant-design-pro.git /tmp/ant-design-pro-upgrade

Read the template's package.json to confirm its version.

Step 2 — Classify files

Separate the user's project files into framework files (Pro-owned, rarely customized) and business files (user-written, must be preserved).

Framework files — diff these against the template:

PathNotes
package.jsondependencies, scripts, devDependencies only
config/config.tsframework config
config/routes.tsstructure only — preserve user-added routes
config/defaultSettings.tslayout/theme defaults
config/proxy.tsstructure only — preserve user targets
src/app.tsxruntime config
src/access.tspermission definitions
src/global.tsxglobal side effects
src/loading.tsxloading component
src/requestErrorConfig.tsrequest interceptor
src/typings.d.tsglobal type declarations
tsconfig.jsonTypeScript config
biome.json or biome.jsonclinter config
.husky/git hooks
commitlint.config.*commit lint config
src/services/ant-design-pro/auto-generated — do NOT manually edit; regenerate with npm run openapi

Business files — preserve these, only adjust imports/APIs if needed:

  • src/pages/** — user pages
  • src/components/** — user components
  • src/models/** — user models
  • src/services/**/*.ts — custom service files (NOT the ant-design-pro/ subdirectory)
  • src/locales/** — user translations (framework keys may need updating)
  • src/utils/** — user utilities
  • mock/** — user mocks
  • Any other files not listed above

Step 3 — Diff framework files

Целият SKILL.md в GitHub