igor-kozhevnikov/cross
最新稳定版本:v1.13.1
Composer 安装命令:
composer require igor-kozhevnikov/cross
包简介
Library for creating console commands
README 文档
README
Library for creating console commands.
Install
composer required igor-kozhevnikov/cross
Configuration
Run the follow command to create config.
Available extensions: php json.
./vendor/bin/cross config [<extension>]
A cross.php or cross.json config file locates in the root directory.
The plugins and commands array contains definitions and configurations of
plugins and commands.
For example:
<?php return [ 'plugins' => [ \Cross\Docker\Plugin\Plugin::class => [ 'env_path' => 'docker/.env' ], \Cross\Git\Plugin\Plugin::class, ], 'command' => [ \Cross\Docker\Commands\SSH::class => [ 'container' => 'packager_workspace' ], \Cross\Git\Commands\Snapshot::class => [ 'is_use_add' => false ], ], ];
{
"plugins": {
"\\Cross\\Docker\\Plugin\\Plugin": { "env_path": "docker/.env" },
"\\Cross\\Git\\Plugin\\Plugin": {}
},
"commands": {
"\\Cross\\Docker\\Commands\\SSH": { "container": "packager_workspace" },
"\\Cross\\Git\\Commands\\Snapshot": { "is_use_add": false }
}
}
Commands
Display all command
./vendor/bin/cross
Make config
./vendor/bin/cross config [<extension>]
Arguments:
extensionExtension of config file. Available values:phpjson.
Examples
You can see commands based on this package in the following repositories:
Alias
Add the following code to ~/.zshrc file to create the x alias.
CROSS_LOCAL=./vendor/bin/cross CROSS_GLOBAL=~/.composer/vendor/bin/cross cross() { if [[ -f $CROSS_LOCAL ]]; then eval "alias x='${CROSS_LOCAL}'" elif [[ -f $CROSS_GLOBAL ]]; then eval "alias x='${CROSS_GLOBAL}'" else eval "alias x='echo The Cross package is not installed'" fi } add-zsh-hook chpwd cross eval cross
And use x command instead of ./vendor/bin/cross command.
License
The Cross is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 145
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-05-05