a3gz/php-cli-tools
Composer 安装命令:
composer require a3gz/php-cli-tools
包简介
Command line tools to prepare Web application assets for deployment
README 文档
README
A set of tools to generate distributable versions of assets.
Tools
Copy
Copy a list of files as per a JSON specification file.
{
"/path/to/src/file": "path/to/dist/file"
}
Use this tool to copy files without modifying them.
Minify
Minifies the input file and saves the result in the destination directory.
Use this tool to minify HTML, Javascript and CSS files.
If you write SASS instead of vanilla CSS, then you may want to use the next tool in the box instead.
SASS to CSS
Convert all .scss files found in the source directory and writes the corresponding .css files in the target.
This tool uses leafo/scssphp to make the conversion.
Revision
It may be usefull to have a revision number generated each time we build assets so we can decide whether to push changes to a server or not.
composer run-script cli-revision path/to/directory [file-name]
This tool will create a file under path/to/directory with a timestamp as content. If file-name is given, the file will have that name otherwise it will fallback to a3gz-php-cli-tools.revision.
If the CI pipeline uses PHPloy, we can test this file for changes to deploy the generated assets:
The line below will instruct PHPloy to deploy everything under dist/ if the revision file changed since last revision.
include[] = 'dist/:path/to/directory/a3gz-php-cli-tools.revision'
For this to work we need to add the revision file to version control.
a3gz/php-cli-tools 适用场景与选型建议
a3gz/php-cli-tools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.62k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 09 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 a3gz/php-cli-tools 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 a3gz/php-cli-tools 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-13