mitirrli/package-builder

一个 composer 包构建器。

2.0.1 2019-11-26 09:13 UTC

README

📦 一个 composer 包构建器。

安装

$ composer global require 'mitirrli/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. 使用 问题跟踪器 提交错误报告。
  2. 问题跟踪器 上回答问题或修复错误。
  3. 贡献新功能或更新 wiki。

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

PHP 扩展包开发

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

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

许可

MIT