amsdard/composer-load-env
Composer 安装命令:
composer require amsdard/composer-load-env
包简介
Simple handler to inject custom environment variables into composer scripts by load defined ENV files
README 文档
README
Simple handler to inject custom environment variables into composer scripts by load defined ENV files
Usage
- install library
composer require amsdard/composer-load-env
- add ENV files into
composer.jsonasextra.env-filesparam
{
...
"extra": {
...
"env-files": [
"FILE-PATH-1",
"FILE-PATH-2"
],
}
}
- add
load-env-filesscript info Yourcompoer.json
{
...
"scripts": {
"load-env-files": [
"Amsdard\\Component\\EnvHandler::loadEnvFiles"
],
},
...
}
- use
@load-env-filesin other scripts
{
...
"scripts": {
"post-install-cmd": [
"@load-env-files",
"@symfony-scripts"
],
...
},
...
}
Workflow
@load-env-filesscript will load files defined atextra.env-filesparam- environment variables from files will be available in the current script scope
统计信息
- 总下载量: 106
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-13