承接 ceus-media/hydrogen-source-indexer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ceus-media/hydrogen-source-indexer

Composer 安装命令:

composer require ceus-media/hydrogen-source-indexer

包简介

Tool to create index of a Hydrogen module source.

README 文档

README

Branch Release PHP version PHPStan level Total downloads License

In short: A tool to create an JSON index file for a collection of modules, usable with the Hydrogen framework.

Introduction

In the world of Hydrogen Framework, there are modules which can be installed from one or many module sources. A module source is a set of Hydrogen modules, produced, collected or maintained by a company or maybe you.

Modules can be installed using the tool Hymn. To be abled to scan for existing modules, a project has a hymn configuration file with registered sources. These sources need to be installed within the project using composer.

Since some libraries are collections with a higher number of modules, the indexing process can be made faster if the source has an index. This tool can create such an index by collecting all necessary information into a JSON file.

Usage

Let's say you have:

  • a project using the Hydrogen Framework
  • used composer to install the framework
  • used composer to install the default module source Hydrogen Modules (optional)
  • have developed own modules, which shall be reusable
  • decided to create an own module source
  • have collected your set of modules in a VCS repository (GitHub, GitLab etc.)
  • created a composer file within the module source reposity
  • made your module library availabe via Packagist (optional)

Installation

Check out your repository in dev mode into a working directory:

composer create-project my-vendor/my-hydrogen-module-source

You now have your modules installed in the current directory.

cd my-hydrogen-module-source
ls -lA

Now, add the module source indexer as a package in dev mode:

composer require ceus-media/hydrogen-source-indexer(:dev-main)

Creation

To create the JSON index, you can do:

php vendor/ceus-media/hydrogen-source-index/index.php json

This will create the index.json in the directory.

Furthermore, you can create an HTML index (index.html) by:

php vendor/ceus-media/hydrogen-source-index/index.php html

You can add both files to the repository. While the JSON file can be used by Hymn, the HTML index is for usability and can be viewed in a browser to get an overview over the modules within the source.

Integration

During installation you have extended your composer file by the indexer package to be installed in dev mode. To shorten the execution of the indexer, you can extend your make file (Makefile) by:

dev-index-json:
    @php vendor/ceus-media/hydrogen-source-indexer/index.php json

dev-index-json-humanreadable:
    @php vendor/ceus-media/hydrogen-source-indexer/index.php json-dev

dev-index-html:
    @php vendor/ceus-media/hydrogen-source-indexer/index.php html

Of course, you can change the target names according to your style.

Customization

Setting

The indexer comes with an empty property file (src/.index.ini) which can hold the main information about your module source. Copy this file to the root of your module source library and update the few lines by your needs.

Example:

id           = "CeusMedia_PublicModules"
title        = "Hydrogen Modules"
url          = "https://github.com/CeusMedia/HydrogenModules"
description  = "Collection of public (free and open) modules for <a href="https://github.com/CeusMedia/HydrogenFramework">Hydrogen Framework</a>"

These information will be used as headers for both index formats.

HTML

The indexer also comes with an HTML template file (src/.index.html) which will be used to create the HTML index. It contains placeholders which are replaced by settings and a generated module list.

Copy this file to the root of your module source library and update the few lines by your needs.

Doing this is recommended because some CSS and JavaScript assets from a Ceus Media CDN server are linked in the default template. If you use your own assets here, your index will not depend on Ceus Media resources.

Contributing

You like this indexer, are using it for your sources and have a better HTML template to commit? Or even better some improvements on the renderer classes? Please feel free to contribute your improvements by forking this repository and creating a pull request. Thank you!

ceus-media/hydrogen-source-indexer 适用场景与选型建议

ceus-media/hydrogen-source-indexer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 60 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 08 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 ceus-media/hydrogen-source-indexer 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

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