pronovix/monorepo-helper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

pronovix/monorepo-helper

Composer 安装命令:

composer require pronovix/monorepo-helper

包简介

Monorepo helper Composer plugin.

README 文档

README

This Composer plugin finds all packages in a GIT monorepo and ensures every time when Composer installs the latest version of a package and the package is available inside the monorepo then the monorepo version of the package gets installed (symlinked or copied from the monorepo) instead other available versions.

Installation

$ composer global require pronovix/monorepo-helper

How it works

The plugin tries to find the latest, valid, semantic versioning GIT tag in monorepo's remote origin. If it does not find a valid semantic versioning tag it falls back to the latest dev version.

The identified version from GIT tags should be always the same as the latest version available version on Packagist or in any other Composer repository from a library. For example, if the published version from the foo/bar package is "1.0.0-alpha1" on Packagist then it is expected to have a "1.0.0-alpha1" GIT tag in your monorepo's remote origin.

The plugin can only fetch the latest tags from the remote origin if the runtime environment has access to the origin repository (via API keys, SSH keys, etc.) If it does not have access to remote origin it is recommended to enable the plugin's offline mode and before every composer command make sure that the latest tags from the remote origin get fetched with git fetch origin manually or automatically.

Configuration options

You can configure this plugin by setting the following configuration options in the root package's composer.json in the extra section under the monorepo-helper key or with the related environment variables. The configuration in the root package's composer.json has the highest priority when the plugin's configuration gets resolved.

{{"extra": {"monorepo-helper": { "key": "value"}}}} Environment variable Type Default value Description
enabled PRONOVIX_MONOREPO_HELPER_ENABLED bool TRUE Allows to disable the plugin. Could be useful if there is an unfixed error in the plugin.
offline-mode PRONOVIX_MONOREPO_HELPER_OFFLINE_MODE bool FALSE If it is set to TRUE then the plugin does not try to fetch the latest tags from remote origin. You should ensures that latest tags are being fetched before the plugin actives.
max-discover-depth PRONOVIX_MONOREPO_HELPER_MAX_DISCOVERY_DEPTH int 5 The maximum package discovery depth from the monorepo's root.
excluded-directories PRONOVIX_MONOREPO_HELPER_EXCLUDED_DIRECTORIES array [] Set of excluded directories (besides vendor) where the plugin should not look for monorepo packages. The environment variable should contain a comma separated list.
monorepo-root PRONOVIX_MONOREPO_HELPER_MONOREPO_ROOT string NULL Could be useful it the plugin installed globally. You can specify the root of the monorepo.

Note: For boolean type configuration options use 1 or 0 in environment variables.

The plugin respects the COMPOSER_MIRROR_PATH_REPOS configuration.

统计信息

  • 总下载量: 633
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2019-08-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固