定制 heyaikeedo/composer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

heyaikeedo/composer

最新稳定版本:v1.2.0

Composer 安装命令:

composer require heyaikeedo/composer

包简介

Aikeedo Composer plugin to register custom installer for Aikeedo plugins/themese etc.

README 文档

README

Aikeedo Composer plugin to register custom installer for Aikeedo plugins/themes.

https://aikeedo.com/

@heyaikeedo

Installation

composer require heyaikeedo/composer

Features

  • Custom installer for aikeedo-plugin and aikeedo-theme package types
  • Automatic copying of public assets to the webroot
  • Automatic cleanup of public assets on uninstall
  • Support for glob patterns

Public Files Configuration

Aikeedo plugins can define public files/directories that should be copied to the webroot during installation. This is configured in the package's composer.json under extra.public.

Basic Syntax

{ "extra": { "public": [ "path/to/file.js", "path/to/directory", { "source": "source/path", "target": "target/path" } ] } }

Target Path Resolution (Model A)

The target path follows "Model A" where target is ALWAYS the final destination path:

Target Format Description Result
"file.js" Package dir + target public/e/{vendor}/{pkg}/file.js
"/file.js" Webroot + target public/file.js
"." Package dir + source basename public/e/{vendor}/{pkg}/{basename}
"/." or "/" Webroot + source basename public/{basename}
null (omitted) Package dir + source basename public/e/{vendor}/{pkg}/{basename}
"dir/*" Glob: contents copied to target Contents copied to target directory

Examples

1. Legacy String Format (preserves full path)

{ "extra": { "public": ["widget/dist/index.html", "widget/dist/styles.css"] } }

Result:

  • widget/dist/index.htmlpublic/e/{vendor}/{pkg}/widget/dist/index.html
  • widget/dist/styles.csspublic/e/{vendor}/{pkg}/widget/dist/styles.css

2. Copy to Package Directory (no leading /)

{ "extra": { "public": [ { "source": "widget/dist/sdk.js", "target": "sdk.js" }, { "source": "assets", "target": "static" } ] } }

Result:

  • widget/dist/sdk.jspublic/e/{vendor}/{pkg}/sdk.js
  • assets/public/e/{vendor}/{pkg}/static/

3. Copy to Webroot (leading /)

{ "extra": { "public": [ { "source": "widget/dist/sdk.js", "target": "/sdk.js" }, { "source": "assets", "target": "/static/assets" } ] } }

Result:

  • widget/dist/sdk.jspublic/sdk.js
  • assets/public/static/assets/

4. Using Basename Shortcuts (. and /.)

{ "extra": { "public": [ { "source": "widget/dist", "target": "." }, { "source": "widget/dist", "target": "/." }, { "source": "widget/dist" } ] } }

Result:

  • "."public/e/{vendor}/{pkg}/dist/ (package dir + basename)
  • "/."public/dist/ (webroot + basename)
  • No target → public/e/{vendor}/{pkg}/dist/ (same as ".")

5. Glob Patterns (copy contents)

{ "extra": { "public": [ { "source": "widget/dist/*", "target": "/assets" } ] } }

Result:

  • Contents of widget/dist/ (e.g., index.html, css/, js/) → public/assets/
  • Files become public/assets/index.html, public/assets/css/..., etc.

Environment Variables

Variable Description Default
PUBLIC_DIR Custom webroot path public

Package Types

This plugin handles the following package types:

  • aikeedo-plugin - Installed to extra/extensions/{vendor}/{package}
  • aikeedo-theme - Installed to extra/extensions/{vendor}/{package}

License

See LICENSE file.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固