chunpat/package-builder

一个 composer 包构建器。

2.0.1 2019-11-26 09:13 UTC

README

📦 一个 composer 包构建器。

安装

$ composer global require 'overtrue/package-builder' --prefer-source

用法

 $ package-builder help

创建一个 composer 包

确保你的路径中包含 ~/.composer/vendor/bin/

package-builder build [target directory]

示例

$ package-builder build ./

# Please enter the name of the package (example: foo/bar): vendor/product
# Please enter the namespace of the package [Vendor\Product]:
# Do you want to test this package ?[Y/n]:
# Do you want to use php-cs-fixer format your code ? [Y/n]:
# Please enter the standard of php-cs-fixer [symfony] ?
# Package vendor/product created in: ./

以下包将被创建

vendor-product
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .php_cs
├── README.md
├── composer.json
├── phpunit.xml.dist
├── src
│   └── .gitkeep
└── tests
    └── .gitkeep

更新包构建器

$ package-builder update

贡献

你可以通过以下三种方式之一进行贡献

  1. 使用 问题追踪器 提交 bug 报告。
  2. 问题追踪器 上回答问题或修复 bug。
  3. 贡献新功能或更新 wiki。

代码贡献过程并不正式。你只需要确保遵循 PSR-0、PSR-1 和 PSR-2 编码规范。任何新的代码贡献都必须附有适用的单元测试。

PHP 扩展包开发

想知道如何从头开始构建 PHP 扩展包吗?

请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》

许可证

MIT