Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slince/composer-alias
:guitar: Composer Alias Plugin
https://github.com/slince/composer-alias
alias composer composer-alias composer-alias-plugin composer-plugin
Last synced: about 1 month ago
JSON representation
:guitar: Composer Alias Plugin
- Host: GitHub
- URL: https://github.com/slince/composer-alias
- Owner: slince
- License: mit
- Created: 2018-01-15T09:57:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-08T02:49:17.000Z (almost 7 years ago)
- Last Synced: 2024-04-22T03:24:09.930Z (8 months ago)
- Topics: alias, composer, composer-alias, composer-alias-plugin, composer-plugin
- Language: PHP
- Homepage:
- Size: 31.3 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README-zh_CN.md
- License: LICENSE
Awesome Lists containing this project
README
# Composer 别名插件
给你的 Composer 添加别名支持功能。
[![Build Status](https://img.shields.io/travis/slince/composer-alias/master.svg?style=flat-square)](https://travis-ci.org/slince/composer-alias)
[![Latest Stable Version](https://img.shields.io/packagist/v/slince/composer-alias.svg?style=flat-square&label=stable)](https://packagist.org/packages/slince/composer-alias)
[![Scrutinizer](https://img.shields.io/scrutinizer/g/slince/composer-alias.svg?style=flat-square)](https://scrutinizer-ci.com/g/slince/composer-alias/?branch=master)## 安装
使用 composer 安装.
```bahs
$ composer global require slince/composer-alias
```## 案例
给 `composer update` 添加别名;
```bash
$ composer alias up update
```现在你可以使用这样的命令去更新你的依赖。
```bash
$ composer up
```
## 用法### 添加别名:
```bash
$ composer alias req require
```
等价于:```bash
$ composer req symfony/console
```### 给 packages 分组
你可以像这样,给你常用的第三方包进行分组
```bash
$ composer req-sf "require symfony/console symfony/event-dispatcher"
```现在你可以使用像这样的比较短的命令同事安装多个包 "symfony/console", "symfony/event-dispatcher"
```bash
$ composer req-sf
```
### 列出所有的别名```bash
$ composer alias -l
```会输出:
```
-------- --------------------------------------------------
Alias Command
-------- --------------------------------------------------
val validate
up update
req-sf require symfony/event-dispatcher symfony/console
req require
i install
-------- --------------------------------------------------
```
### 移除已经存在的别名```bash
$ composer alias [alias name] --unset
```### Help
执行下面命令查看帮助
```bash
$ composer alias --help
```## 开源协议
采用 MIT 协议. 看 [MIT](https://opensource.org/licenses/MIT)