nfreear/composer-suggest
最新稳定版本:v1.2.0
Composer 安装命令:
composer require nfreear/composer-suggest
包简介
Composer plugin to install a custom group of suggested packages, based on keyword patterns. ' vi .env && composer install '
README 文档
README
composer-suggest
A Composer plugin to install a custom group of suggested packages, based on keyword patterns. (Caution)
Example composer.json:
{
"suggest": {
"a/b": "1.0; This package is for [LACE] only",
"c/d": "2.1, This package is for JuxtaLearn and LACE.",
"e/f": "3.2, This is just for [JXL].",
"g/h": "1.0-beta; Experiment-A"
}
}
Usage
-
Set an environment variable containing a pattern/keywords in a
.envfile,echo 'NF_COMPOSER_SUGGEST="(EXP|LACE)"' > .env
-
Require the plugin,
composer require nfreear/composer-suggest -
Install as you would normally (verbose),
composer -vvv install
Legacy
In Composer script mode, an example composer.json might contain:
{
"suggest": {
"a/b": "1.0; This package is for [LACE] only",
"c/d": "2.1, This package is for JuxtaLearn and LACE.",
"e/f": "3.2, This is just for [JXL].",
"g/h": "1.0-beta; Experiment-A"
},
"scripts": {
"dry-run-suggest": "\\Nfreear\\Composer\\Suggest::dryRun",
"install-suggest": "\\Nfreear\\Composer\\Suggest::install",
"install-lace": "./vendor/bin/suggest --dry LACE"
}
}
Legacy usage:
> composer -v install-lace
Legacy advanced usage:
> composer -v dry-run-suggest "Ju?X(ta)?L" # Packages suggested for 'Juxtalearn' & 'JXL'. > composer -v dry-run-suggest "Experiment-A"
Test
composer test
Caution
Use of the composer-suggest plugin implies that you probably won't commit composer.lock to version control. Various people say this is bad, and as a general rule they are probably correct.
Composer-suggest works well when all/most of the dependencies in require and suggest
have precise version constraints (1.2.3) as opposed to loose ones (1.*, >= 1.5..).
It is also useful during rapid development phases of a project. See it in use in the LACE/ OER Research Hub code, and Open Media Player code-base.
Developed for the LACE Evidence Hub, part of the Learning Analytics Community Exchange project.
Inspired by and based in part on the composer-merge-plugin – thank you!
License: MIT
© 2016 The Open University. (Institute of Educational Technology)
统计信息
- 总下载量: 329
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-07