woocommerce-dev-cycle
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWooCommerce Development Cycle
WooCommerce开发流程
This skill provides guidance for the WooCommerce development workflow, including running tests, code quality checks, and troubleshooting.
本Skill为WooCommerce开发工作流提供指导,包括运行测试、代码质量检查及问题排查。
Instructions
操作指南
Follow these guidelines for WooCommerce development workflow:
- Running tests: See running-tests.md for PHP and JavaScript test commands, test environment setup, and troubleshooting
- Code quality: See code-quality.md for linting and code style fixes
- PHP linting patterns: See php-linting-patterns.md for common PHP linting issues and fixes
- JS/TS i18n patterns: See js-i18n-patterns.md for translatable string patterns and placeholder usage
- Markdown linting: See markdown-linting.md for markdown file linting and formatting
遵循以下WooCommerce开发工作流指南:
- 运行测试:查看running-tests.md获取PHP和JavaScript测试命令、测试环境设置及问题排查方法
- 代码质量:查看code-quality.md了解代码检查及代码风格修复方法
- PHP代码检查模式:查看php-linting-patterns.md获取常见PHP代码检查问题及修复方案
- JS/TS国际化模式:查看js-i18n-patterns.md了解可翻译字符串模式及占位符使用方法
- Markdown代码检查:查看markdown-linting.md了解Markdown文件的代码检查及格式化方法
Development Workflow
开发工作流
The standard development workflow:
- Make code changes
- Run relevant tests:
pnpm run test:php:env -- --filter YourTestClass - Run linting/type checking:
pnpm run lint:changes:branch:php - Fix any issues:
pnpm run lint:php:fix - Commit changes only after tests pass
标准开发工作流:
- 进行代码修改
- 运行相关测试:
pnpm run test:php:env -- --filter YourTestClass - 运行代码检查/类型校验:
pnpm run lint:changes:branch:php - 修复所有问题:
pnpm run lint:php:fix - 仅在测试通过后提交修改
Key Principles
核心原则
- Always run tests after making changes to verify functionality
- Use specific test filters to run relevant tests during development
- Fix linting errors solely for code in your current branch
- Test failures provide detailed output showing expected vs actual values
- The test environment handles WordPress/WooCommerce setup automatically
- 代码修改后务必运行测试以验证功能
- 开发期间使用特定测试过滤器运行相关测试
- 仅修复当前分支代码中的代码检查错误
- 测试失败会提供详细输出,展示预期值与实际值的对比
- 测试环境会自动处理WordPress/WooCommerce的设置