digilabscz/hermes 问题修复 & 功能扩展

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

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

digilabscz/hermes

最新稳定版本:1.0.7

Composer 安装命令:

composer require digilabscz/hermes

包简介

A Composer package to map assets via symlinks

README 文档

README

Hermes is a Composer plugin that helps you manage asset files by creating symbolic links. This plugin reads a .hermes file from your package and maps the specified files to a designated asset directory in your project.

Installation

To install Hermes, run the following command in your project directory:

composer require digilabscz/hermes

Configuration

After installing the plugin, you need to configure it in your composer.json file. Specify the asset directory where you want the symbolic links to be created using the extra section.

{
    "require": {
        "digilabscz/hermes": "*"
    },
    "extra": {
        "hermes-assets-dir": "www/assets"
    }
}

Usage

  1. Define Assets in Packages: In any Composer package that contains assets you want to be symlinked, create a file named .hermes in the root directory of the package. List the paths to the asset files relative to the package root in this file.

    Example .hermes file:

     /js/datagrid.js
     /css/styles.css
    
  2. Install Packages: When you install or update your Composer dependencies, the plugin will automatically read the .hermes files from each package and create the specified symbolic links in the configured asset directory.

  3. Uninstall Packages: When you uninstall a package, the plugin will remove the symbolic links associated with that package from the asset directory.

Example

Given the following .hermes file in the digilabscz/datagrid package:

/js/datagrid.js

And the following configuration in your main project's composer.json:

{
    "require": {
        "digilabscz/hermes": "*"
    },
    "extra": {
        "hermes-assets-dir": "www/assets"
    }
}

After running composer install, the plugin will create the following symbolic link:

[ROOT_DIR]/www/assets/vendor/digilabscz/datagrid/js/datagrid.js -> [ROOT_DIR]/vendor/digilabscz/datagrid/js/datagrid.js

Error Handling

If the hermes-assets-dir is not specified in the extra section of your composer.json, the plugin will throw an error and stop execution:

Hermes assets directory is not specified in composer.json

Make sure to configure the hermes-assets-dir to avoid this error.

License

This project is licensed under the MIT License.

digilabscz/hermes 适用场景与选型建议

digilabscz/hermes 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 343 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 07 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 digilabscz/hermes 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 digilabscz/hermes 我们能提供哪些服务?
定制开发 / 二次开发

基于 digilabscz/hermes 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2024-07-02