library composer-load-env
Simple handler to inject custom environment variables into composer scripts by load defined ENV files
amsdard/composer-load-env
Simple handler to inject custom environment variables into composer scripts by load defined ENV files
- Monday, November 13, 2017
- by krzysztof-kabala
- Repository
- 1 Watchers
- 0 Stars
- 39 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 34 % Grown
Composer Load ENV
Simple handler to inject custom environment variables into composer scripts by load defined ENV files, (*1)
Usage
composer require amsdard/composer-load-env
- add ENV files into
composer.json
as extra.env-files
param
{
...
"extra": {
...
"env-files": [
"FILE-PATH-1",
"FILE-PATH-2"
],
}
}
- add
load-env-files
script info Your compoer.json
{
...
"scripts": {
"load-env-files": [
"Amsdard\\Component\\EnvHandler::loadEnvFiles"
],
},
...
}
- use
@load-env-files
in other scripts
{
...
"scripts": {
"post-install-cmd": [
"@load-env-files",
"@symfony-scripts"
],
...
},
...
}
Workflow
-
@load-env-files
script will load files defined at extra.env-files
param
- environment variables from files will be available in the current script scope
dev-master
9999999-dev
Simple handler to inject custom environment variables into composer scripts by load defined ENV files
Sources
Download
MIT
The Requires
by
Krzysztof Kabala
v1.0
1.0.0.0
Simple handler to inject custom environment variables into composer scripts by load defined ENV files
Sources
Download
MIT
The Requires
by
Krzysztof Kabala