drago-ex/project-installer 问题修复 & 功能扩展

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

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

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 in vendor/drago-ex to 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

  • --verbose or -v: Show detailed file-by-file progress during installation.

How it works

  1. drago-install scans all installed packages for the extra.drago-project.install configuration.
  2. It resolves relative paths against the package root and the current working directory.
  3. It respects the allow-library-install flag in your root composer.json (defaults to false for libraries).
  4. drago-clean specifically targets vendor/drago-ex and removes resources directories to keep your vendor clean after files have been mirrored to your project.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固