3.4 KiB
3.4 KiB
贡献指南 / Contributing Guide
感谢你对 ECS Framework 的关注!
Thank you for your interest in contributing to ECS Framework!
Commit 规范 / Commit Convention
本项目使用 Conventional Commits 规范。
This project follows the Conventional Commits specification.
格式 / Format
<type>(<scope>): <subject>
<body>
<footer>
类型 / Types
- feat: 新功能 / New feature
- fix: 错误修复 / Bug fix
- docs: 文档变更 / Documentation changes
- style: 代码格式(不影响代码运行) / Code style changes
- refactor: 重构(既不是新功能也不是修复) / Code refactoring
- perf: 性能优化 / Performance improvements
- test: 测试相关 / Test changes
- build: 构建系统或依赖变更 / Build system changes
- ci: CI 配置变更 / CI configuration changes
- chore: 其他变更 / Other changes
范围 / Scope
- core: 核心包 @esengine/ecs-framework
- math: 数学库包
- editor: 编辑器
- docs: 文档
示例 / Examples
# 新功能
feat(core): add component pooling system
# 错误修复
fix(core): fix entity deletion memory leak
# 破坏性变更
feat(core): redesign system lifecycle
BREAKING CHANGE: System.initialize() now requires Scene parameter
自动发布 / Automatic Release
本项目使用 Semantic Release 自动发布。
This project uses Semantic Release for automatic publishing.
版本规则 / Versioning Rules
根据你的 commit 类型,版本号会自动更新:
Based on your commit type, the version will be automatically updated:
feat: 增加 minor 版本 (0.x.0)fix,perf,refactor: 增加 patch 版本 (0.0.x)BREAKING CHANGE: 增加 major 版本 (x.0.0)
发布流程 / Release Process
- 提交代码到
master分支 / Push commits tomasterbranch - GitHub Actions 自动运行测试 / GitHub Actions runs tests automatically
- Semantic Release 分析 commits / Semantic Release analyzes commits
- 自动更新版本号 / Version is automatically updated
- 自动生成 CHANGELOG.md / CHANGELOG.md is automatically generated
- 自动发布到 npm / Package is automatically published to npm
- 自动创建 GitHub Release / GitHub Release is automatically created
开发流程 / Development Workflow
- Fork 本仓库 / Fork this repository
- 创建特性分支 / Create a feature branch
git checkout -b feat/my-feature - 提交你的变更 / Commit your changes
git commit -m "feat(core): add new feature" - 推送到你的 Fork / Push to your fork
git push origin feat/my-feature - 创建 Pull Request / Create a Pull Request
本地测试 / Local Testing
# 安装依赖
npm install
# 运行测试
npm test
# 构建
npm run build
# 代码检查
npm run lint
# 代码格式化
npm run format
问题反馈 / Issue Reporting
如果你发现了 bug 或有新功能建议,请创建 Issue。
If you find a bug or have a feature request, please create an issue.
许可证 / License
通过贡献代码,你同意你的贡献将遵循 MIT 许可证。
By contributing, you agree that your contributions will be licensed under the MIT License.