agence-adeliom / lumberjack-cli
1.1.7
2022-07-27 14:40 UTC
Requires
- php: ^7.1|^8.0
- blast/facades: ^1.0
- icanboogie/inflector: ^2.0
- jawira/case-converter: ^3.4
- rareloop/lumberjack-core: *
- symfony/console: ^5.4
Requires (Dev)
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^8.0
- dev-master
- 1.1.7
- 1.1.6
- 1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-dependabot/npm_and_yarn/cacheable-request-and-release-it/bumper-and-release-it/conventional-changelog-and-release-it-10.2.7
- dev-dependabot/npm_and_yarn/http-cache-semantics-4.1.1
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-develop
This package is auto-updated.
Last update: 2024-09-12 07:10:27 UTC
README
这里应该放置您的描述。尽量将其限制在一两段之内,并提及您支持哪些PSR以避免用户和贡献者的混淆。
安装
您可以通过composer安装此包
composer require agence-adeliom/lumberjack-cli
安装完成后,您需要将console
文件复制到您的Lumberjack主题目录中。
假设您在Bedrock中使用Lumberjack。如果不是,您可能需要修改console
文件中的路径
基本使用
现在您可以从Lumberjack主题目录中访问Adeliom CLI
可用命令
help Displays help for a command
list Lists commands
make
make:admin Create a Admin
make:ajax Create a Ajax Action
make:controller Create a Controller
make:cron Create a Cron Job
make:env Create a environement
make:event Create a Event Listener
make:exception Create a Exception
make:flex-layout Create a FlexibleLayout
make:form Create a Form
make:hook Create a Hooks Class
make:posttype Create a PostType
make:provider Create a ServiceProvider
make:taxonomy Create a Taxonomy
make:viewmodel Create a ViewModel
route
route:list List all registered routes
显示可用命令
php console list
运行命令
对于名为test:command
的命令,您将运行以下命令:
php console test:command
获取有关命令的额外帮助
对于名为test:command
的命令,您将运行以下命令:
php console help test:command
添加命令
要将额外的命令添加到Adeliom CLI,请将它们添加到config/commands.php
(如果不存在,请创建文件)。
// config/commands.php return [ 'commands' => [ MyCommand::class, ], ];
编写命令
创建Adeliom\WP\CLI\Commands\Command
的子类
namespace MyNamespace; use Adeliom\WP\CLI\Commands\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class ControllerMake extends Command { protected $signature = 'test:command {paramName : The description of the parameter}'; protected $description = 'A description of the command'; protected function execute(InputInterface $input, OutputInterface $output) { // Command implementation } }
Adeliom CLI使用与Laravel相同的$signature
语法,有关更多信息,请参阅此处。
Adeliom CLI的Command
是Symfony的Command
对象的子类,有关如何实现execute()
函数的更多信息,请参阅此处。
测试
composer test
变更日志
有关最近更改的更多信息,请参阅CHANGELOG。
贡献
有关详细信息,请参阅CONTRIBUTING。
鸣谢
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。