定制 seferov/composer-env-script 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

seferov/composer-env-script

最新稳定版本:v1.0.0

Composer 安装命令:

composer require seferov/composer-env-script

包简介

Composer script for handling gitignored env files

README 文档

README

The package allows creating or updating ignored env file (ex: .env.local) based on a default env file (ex: .env) interactively.

demo

Installation

composer require seferov/composer-env-script

Modify your composer.json file:

{
  "scripts": {
    "post-install-cmd": [
      "Seferov\\ComposerEnvScript\\ScriptHandler::buildEnv"
    ],
    "post-update-cmd": [
      "Seferov\\ComposerEnvScript\\ScriptHandler::buildEnv"
    ]
  }
}

Configuration

By default, the package generates/updates .env.local file based on .env. This can be changed trough composer.json extra. The configuration also allows managing multiple .env files:

{
  "extra": {
    "seferov-env": [
      {
        "from-file": ".env",
        "to-file": ".env.local"
      },
      {
        "from-file": "somepath/.env.test",
        "to-file": "somepath/.env.test.local"
      }
    ]
  }
}

Credits

The package is highly inspired by https://github.com/Incenteev/ParameterHandler which is for managing ignored parameters.

统计信息

  • 总下载量: 36.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-29