kjohnson / impress-cli
生成DDD类的CLI工具
0.0.7
2024-01-20 01:36 UTC
Requires
- php: ^8.1
Requires (Dev)
- fakerphp/faker: ^1.9.1
- laminas/laminas-text: *
- laravel-zero/framework: ^10.2
- laravel/pint: ^1.13
- laravel/prompts: ^0.1.13
- mockery/mockery: ^1.6
- nunomaduro/termwind: ^1.15.1
- pestphp/pest: ^2.22
README
_____
|_ _|
| | _ __ ___ _ __ _ __ ___ ___ ___
| | | '_ ` _ \| '_ \| '__/ _ \/ __/ __|
_| |_| | | | | | |_) | | | __/\__ \__ \
|_____|_| |_| |_| .__/|_| \___||___/___/
| |
|_|
Impress 是一个用于生成特定 领域 下域驱动设计 (DDD) 类的开发者命令行工具,例如 动作、控制器 和 异常。
安装
CLI 通过 Composer 全局安装,并可以从包含 src
子目录的任何目录中调用。
composer global require kjohnson/impress-cli
注意:必须将 .composer/vendor/bin
添加到 PATH 中,以便全局调用命令,这在不同的操作系统中有所不同。
使用方法
安装后,可以从包含 src
子目录的任何目录中调用 CLI。
USAGE: <command> [options] [arguments] make:action Create a new Action class make:controller Create a new Controller class make:domain Create a new Domain directory make:exception Create a new Exception class
示例用法
impress make:domain User // Creates the `User` domain/directory within `src/` impress make:action User UpdateUserPassword // Creates the `UpdateUserPassword` action within the `User` domain // See src/User/Actions/UpdateUserPassword.php
每个命令都会在相应的 领域 内生成适当的目录和文件。
维护
发布更新
- 在
composer.json
中更新版本号 - 运行
composer run build
- 提交并推送更改
- 在 GitHub 上创建新的发布版
- 在 Packagist 上更新包