simialbi/composer-asset-plugin
Composer 安装命令:
composer require simialbi/composer-asset-plugin
包简介
NPM/Bower Dependency Manager for Composer 2
README 文档
README
The Composer Asset Plugin allows you to manage project assets (css, js, etc.) in your composer.json
without installing NPM or Bower.
This plugin works by transposing package information from NPM or Bower to a compatible version for Composer. This allows you to manage asset dependencies in a PHP based project very easily.
Important:
⚠ This plugin is based on François Pluchino's Version for composer 1. This v2 is not maintained by François Pluchino.
The next official major version of Composer Asset Plugin by François Pluchino is so different, but also incompatible with the current version, that it became a new project named Foxy.
Features include:
- Works with native management system versions of VCS repository of composer
- Works with public and private VCS repositories
- Lazy loader of asset package definitions to improve performance
- Import filter with the dependencies of the root package and the installed packages, for increased dramatically the performance for the update
- Automatically get and create an Asset VCS repository defined in:
- Automatically get and create the Asset VCS repositories of dependencies defined in each asset package (dev dependencies included)
- Mapping conversion of asset package to composer package for:
- Conversion of Semver version to the composer version
- Conversion of Semver range version to the composer range version
- Conversion of dependencies with URL to the composer dependencies with the creation of VCS repositories
- Conversion of multiple versions of the same dependency to different dependencies of composer
- Add manually the multiple versions of a same dependency in the project
- Add a custom config of VCS Repository
- Override the config of VCS Repository defined by the asset registry directly in config section of root composer
- VCS drivers for:
- Local cache system for:
- package versions
- package contents
- repository redirects
- Custom asset installers configurable in the root file
composer.json - For Bower, all files defined in the section
ignorewill not be installed - Disable or replace the deleting of the ignore files for Bower
- Enable manually the deleting of the ignore files for NPM
- Use the Ignore Files Manager in the Composer scripts
- Configure the plugin per project, globally or with the environment variables
- Compatible with all commands, including:
dependsdiagnoselicensesremoverequiresearchshowstatus
Why this plugin?
There already are several possibilities for managing assets in a PHP project:
- Install Node.js and use NPM or Bower command line in addition to Composer command line
- Do #1, but add Composer scripts to automate the process
- Include assets directly in the project (not recommended)
- Create a repository with all assets and include the
composer.jsonfile (and use Packagist or an VCS Repository) - Add a package repository in
composer.jsonwith a direct download link - Create a Satis or Packagist server
- Other?
It goes without saying that each javascript, CSS, etc. library should be developed with the usual tools for that language, which front-end developers know well. However, in the case of a complete project in PHP, it shouldn't be necessary to use several tools (PHP, Nodejs, Composer, NPM, Bower, Grunt, etc.) to simply install these assets in your project.
This plugin has been created to address these issues. Additionally, most developers will not add a composer.json
file to their projects just to support php based projects, especially when npm and/or bower already exist and are
widely used.
Documentation
The bulk of the documentation is located in Resources/doc/index.md:
Installation
All the installation instructions are located in documentation.
License
This composer plugin is under the MIT license. See the complete license in:
About
Fxp Composer Asset Plugin is a François Pluchino initiative. See also the list of contributors.
Reporting an issue or a feature request
Issues and feature requests are tracked in the Github issue tracker.
simialbi/composer-asset-plugin 适用场景与选型建议
simialbi/composer-asset-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 354 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 07 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「nodejs」 「package」 「asset」 「composer」 「npm」 「bower」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 simialbi/composer-asset-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 simialbi/composer-asset-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 simialbi/composer-asset-plugin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
DNode RPC protocol for PHP 5.3
Send events to a websocket real time engine though PHP
Asset for Bulma Free for YiiFramework v.3.0.
Send events to a websocket real time engine though PHP
Simple ASCII output of array data
统计信息
- 总下载量: 354
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-15