fragotesac/api-tools-asset-manager
Composer 安装命令:
composer require fragotesac/api-tools-asset-manager
包简介
Composer plugin for copying module assets into application document roots.
README 文档
README
🇷🇺 Русским гражданам
Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
🇺🇸 To Citizens of Russia
We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"
api-tools-asset-manager is a composer plugin that will copy configured web-accessible
assets into the public document root of your Laminas application. It uses
the configuration format of rwoverdijk/AssetManager,
and specifically the subset:
'asset_manager' => [ 'resolver_configs' => [ 'paths' => [ /* paths containing asset directories */ ], ], ],
Each configured path is iterated, and every path under it is then copied into the public tree.
Installation
$ composer require --dev laminas-api-tools/api-tools-asset-manager
Recommended for development
We recommend usage of this module primarily for development purposes. In most cases, assets from third-party modules should be overridden with project-specific assets when preparing for production. To emphasize this, the assets are excluded from your git repository by default. (You may add them manually later, as explained below.)
Example
As an example, given the following directory structure inside a package:
./
- asset/
- README.md
- gruntfile.js
- package.json
- api-tools/
- css/
- bootstrap.min.css
- img/
- logo.png
- js/
- bootstrap.min.js
- jquery.min.js
- api-tools-welcome/
- css/
- main.min.css
- img/
- ag-hero.png
- config/
- module.config.php
where module.config.php defines (minimally) the following:
return [ 'asset_manager' => [ 'resolver_configs' => [ 'paths' => [ __DIR__ . '/../asset/' ], ], ], ]
When you install the package, the asset manager will copy each of the
asset/api-tools/ and asset/api-tools-welcome/ trees to the project's
public/ path. The individual files asset/README.md, asset/gruntfile.js, and
asset/package.json are omitted from the install, as they are not directories.
Additionally, during installation, the plugin adds a .gitignore file to the
public/ path, listing each of the new directories:
# public/.gitignore
api-tools/
api-tools-welcome/
After installation, you may access any of the assets installed relative to the public root.
Uninstallation
When you remove the module, the plugin will:
- Remove any asset trees configured for the module from the public tree.
- Remove the
.gitignoreentries associated with those asset trees from thepublic/.gitignorefile.
Keeping assets
Assets are marked by Git to ignore by default. The intention of this module is primarily for development purposes; it was developed to allow installation of assets related to the Apiglity admin UI, welcome screen, and documentation, most of which are relevant in development mode only.
However, if you wish to keep the assets in your public tree, you can do so as follows:
- Edit the
public/.gitignorefile to remove the entry for the asset tree(s) you wish to keep. - Add the asset tree(s) to your repository (
git add public/{tree}).
Removing the entry from public/.gitignore is enough to prevent the uninstaller
from removing the assets when you remove a module.
fragotesac/api-tools-asset-manager 适用场景与选型建议
fragotesac/api-tools-asset-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 fragotesac/api-tools-asset-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fragotesac/api-tools-asset-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2025-06-03