drago-ex/project-installer
Composer 安装命令:
composer require drago-ex/project-installer
包简介
Installation and cleanup tools for Drago projects.
README 文档
README
Tools for automatic installation and cleanup of project resources from Composer packages.
Features
drago-install: Automatically copies or replaces files/directories from vendor packages to your project root.drago-clean: Cleans up redundant resource folders invendor/drago-exto prevent class duplication or namespace collisions.
Installation
Add the package to your project:
composer require drago-ex/project-installer
For component development, add it to require-dev:
composer require --dev drago-ex/project-installer
Configuration
In your package's composer.json, define what should be installed:
"extra": { "drago-project": { "install": { "copy": { "resources/Permission": "app/Core/Permission", "resources/assets": "assets/naja" }, "replace": { "resources/config/overrides.neon": "app/config/overrides.neon" } } } }
Sections:
copy: Copies files only if they do not already exist in the destination. Safe for initial setup.replace: Always overwrites the destination files. Useful for core updates or shared assets.
Usage
Automation
Add these scripts to your composer.json to automate the process:
"scripts": { "post-install-cmd": [ "drago-install", "drago-clean" ], "post-update-cmd": [ "drago-install", "drago-clean" ] }
Manual Execution
You can also run the commands manually from your terminal:
vendor/bin/drago-install vendor/bin/drago-clean
Options
--verboseor-v: Show detailed file-by-file progress during installation.
How it works
drago-installscans all installed packages for theextra.drago-project.installconfiguration.- It resolves relative paths against the package root and the current working directory.
- It respects the
allow-library-installflag in your rootcomposer.json(defaults tofalsefor libraries). drago-cleanspecifically targetsvendor/drago-exand removesresourcesdirectories to keep your vendor clean after files have been mirrored to your project.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-14