pantheon-systems/terminus-plugin-example

示例Terminus命令

2.0.3 2023-01-31 13:46 UTC

README

CircleCI Actively Maintained

Terminus v2.x - v3.x Compatible

一个简单的Terminus-CLI插件,用于演示如何添加新命令。

向Terminus添加命令 'hello' 和 'auth:hello'。在Terminus插件文档中了解更多关于Terminus插件的信息

配置

这些命令不需要配置

使用方法

  • terminus hello
  • terminus auth:hello

安装

使用Terminus 3安装此插件

terminus self:plugin:install terminus-plugin-example

在Terminus旧版本上

mkdir -p ~/.terminus/plugins
curl https://github.com/pantheon-systems/terminus-plugin-example/archive/2.x.tar.gz -L | tar -C ~/.terminus/plugins -xvz

测试

此示例项目包含四个测试目标

  • composer lint:检查所有PHP源文件的语法。
  • composer cs:代码风格检查。
  • composer unit:使用phpunit运行单元测试。
  • composer functional:使用bats运行功能测试。

要一起运行所有测试,请使用composer test

请注意,在运行测试之前,您应该首先运行

  • composer install
  • composer install-tools

帮助

运行 terminus help auth:hello 以获取帮助。