kjohnson/impress-cli

生成DDD类的CLI工具

安装: 23

依赖: 0

建议者: 0

安全性: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:项目

0.0.7 2024-01-20 01:36 UTC

This package is auto-updated.

Last update: 2024-09-20 03:08:04 UTC


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

每个命令都会在相应的 领域 内生成适当的目录和文件。

维护

发布更新

  1. composer.json 中更新版本号
  2. 运行 composer run build
  3. 提交并推送更改
  4. 在 GitHub 上创建新的发布版
  5. 在 Packagist 上更新包