a3gz/php-cli-tools 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

a3gz/php-cli-tools

最新稳定版本:3.1.0

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.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-13