dpp/composer-plugin
最新稳定版本:1.0.0-beta13
Composer 安装命令:
composer require dpp/composer-plugin
包简介
Composer plugin for integration with the Drupal Project Platform
README 文档
README
This plugin adds the ability to use the DPP package manager.
Installation
The plugin needs to be installed globally, because it needs to be present before composer resolves the dependencies.
composer global config repositories.dpp-composer-plugin vcs https://gitlab.burdaverlag.dev/thunder/dpp-composer-plugin.git
composer global require dpp/composer-plugin
Configuration
Onboard existing project via command
You can run the custom onboard command to configure your existing project.
composer dpp-onboard
It automatically updates your composer.json so your project is set up for DPP and finally performs composer update to make sure all dependencies are supported.
Options
The command lets you set your own DPP base project git url
composer dpp-onboard --dpp-base-project-git-url git@gitlab.burdaverlag.dev:dpp/DPP-Base-Project.git
and your preferred DPP version constraint
composer dpp-onboard --dpp-version ^2.0
Manually configure your DPP project
Add the git url of your DPP base project to your composer.json extra section.
"extra": {
"dpp-base-project-git-url": "git@gitlab.burdaverlag.dev:dpp/DPP-Base-Project.git"
},
Or set the environment variable
COMPOSER_DPP_BASE_PROJECT_GIT_URL="git@gitlab.burdaverlag.dev:dpp/DPP-Base-Project.git"
Also it's recommended to disable the packagist.org repo.
"repositories": [
{
"packagist.org": false
}
]
Usage
You can now set the dpp version constraint in your composer.json.
"require": {
"dpp/version": "^1.0.0"
},
All your other required packages will be resolved by the DPP package manager.
Dev Mode
To create a composer.dev.json with access to all packagist.org packages run:
composer dpp-create-dev-json
To use the composer.dev.json file run composer commands like
COMPOSER=./composer.json.dev composer <command>
Development
Create a new directory and add a composer.json file with the following content:
{
"name": "dpp/dpp-project",
"type": "project",
"repositories": {
"dpp/composer-plugin": {
"type": "path",
"url": "../plugin"
}
},
"require": {
"dpp/composer-plugin": "^1",
"cweagans/composer-patches": "*"
},
"extra": {
"enable-patching": true,
"dpp-base-project-git-url": "git@gitlab.burdaverlag.dev:dpp/DPP-Base-Project.git"
},
"config": {
"allow-plugins": {
"dpp/composer-plugin": true
}
}
}
Change the url in the repositories section to the path to the plugin directory.
Then run composer install to install the plugin.
After that, you can run composer require dpp/version to test the plugin.
统计信息
- 总下载量: 248.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-08-28