تخطَّ إلى المحتوى
أمرمستورد

svelte-migrate

Migrate Svelte/SvelteKit projects between versions, adopt new features like runes, and handle breaking changes.

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

الملفات: 1 · الحجم: 3.1 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

بعد التنزيل، شغّل الأمر في الطرفية. يسأل unzip قبل أن يستبدل أي ملف موجود.

  • لهذا المشروع

    يوضع في: .claude/commands/

    mkdir -p .claude/commands && unzip ~/Downloads/svelte-migrate.zip -d .claude/commands

  • لحسابك على الجهاز كله

    يوضع في: ~/.claude/commands/

    mkdir -p ~/.claude/commands && unzip ~/Downloads/svelte-migrate.zip -d ~/.claude/commands

التعليمات

/svelte:migrate

Migrate Svelte/SvelteKit projects between versions, adopt new features like runes, and handle breaking changes.

Instructions

You are acting as the Svelte Development Agent focused on migrations. When migrating projects:

  1. Migration Types:

    Version Migrations:

    • Svelte 3 → Svelte 4
    • Svelte 4 → Svelte 5 (Runes)
    • SvelteKit 1.x → SvelteKit 2.x
    • Legacy app → Modern SvelteKit

    Feature Migrations:

    • Stores → Runes ($state, $derived)
    • Class components → Function syntax
    • Imperative → Declarative patterns
    • JavaScript → TypeScript
  2. Migration Process:

    # Automated migrations
    npx sv migrate [migration-name]
    
    # Manual migration steps
    1. Backup current code
    2. Update dependencies
    3. Run codemods
    4. Fix breaking changes
    5. Update configurations
    6. Test thoroughly
    
  3. Runes Migration:

    // Before (Svelte 4)
    let count = 0;
    $: doubled = count * 2;
    
    // After (Svelte 5)
    let count = $state(0);
    let doubled = $derived(count * 2);
    
  4. Breaking Changes:

    • Component API changes
    • Store subscription syntax
    • Event handling updates
    • SSR behavior changes
    • Build configuration updates
    • Package import paths
  5. Migration Checklist:

    • Update package.json dependencies
    • Run automated migration scripts
    • Update component syntax
    • Fix TypeScript errors
    • Update configuration files
    • Test all routes and components
    • Update deployment scripts
    • Review performance impacts

Example Usage

User: "Migrate my Svelte 4 app to Svelte 5 with runes"

Assistant will:

  • Analyze current codebase
  • Create migration plan
  • Run npx sv migrate svelte-5
  • Convert reactive statements to runes
  • Update component props syntax
  • Fix effect timing issues
  • Update test files
  • Handle edge cases manually
  • Provide rollback strategy

الملفات

  • LICENSE1 ك.ب
  • svelte-migrate.md2.1 ك.ب

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • أمرمستورد

    accessibility-audit

    Audit web accessibility for WCAG compliance with automated axe-core tests, keyboard and screen reader checks, and remediation guidance

    MITالملفات: 1

  • أمرمستورد

    component-scaffold

    Scaffold React and React Native components with TypeScript, tests, styles, and Storybook stories

    MITالملفات: 1

  • أمرمستورد

    create-component

    Guided component creation with proper patterns

    MITالملفات: 1

  • أمرمستورد

    create-plugin

    Guided end-to-end plugin creation workflow with component design, implementation, and validation

    Apache-2.0الملفات: 1

  • أمرمستورد

    gws-events-renew

    Google Workspace Events: Renew/reactivate Workspace Events subscriptions.

    MITالملفات: 1