a3gz/assets-dispatcher 问题修复 & 功能扩展

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

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

a3gz/assets-dispatcher

最新稳定版本:1.0.0

Composer 安装命令:

composer require a3gz/assets-dispatcher

包简介

Dispatch versioned assets.

README 文档

README

Install

composer require a3gz/assets-dispatcher 

How to use

Please, check out the included demo.

What does it do?

Assets Dispatcher offers a way to easily minify-and-cache-once Javascript and CSS assets on-the-fly.

The full sized assets don't need to be below public_html; the PHP dispatcher will:

  1. Attempt to dispatch a minified version of the requested asset.
  2. If the above fails, look for the original non-minified file, create the minified version and dispatch the resulting file.

Evidently, Assets Dispatcher isn't the fastest way to serve Javascript/CSS files because even when there's a minified version available, everything is resolved by a PHP program. For this reason the use proposed in the demo may not be a convenient setup.

Assets Dispatcher as an automated minifier

An alternative use we can have for Assets Dispatcher is that of an automated minifier. Please, take a look at demo-alt for details.

In this setup, instead of using a PHP dispatcher to serve the assets, we use it to generate the minified versions of all the resources. In the demo-alt we do this via a PHP file that we have to HTTP GET, but in a real situation we would use a cron job instead.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固