dev-master
9999999-dev https://github.com/a3gz/xs-dispatcherDispatch versioned assets.
MIT
php js dispatcher css dispatcher
Dispatch versioned assets.
composer require a3gz/assets-dispatcher
Please, check out the included demo., (*1)
Assets Dispatcher offers a way to easily minify-and-cache-once Javascript and CSS assets on-the-fly., (*2)
The full sized assets don't need to be below public_html
; the PHP dispatcher will:, (*3)
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., (*4)
An alternative use we can have for Assets Dispatcher is that of an automated minifier. Please, take a look at demo-alt
for details., (*5)
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., (*6)
Dispatch versioned assets.
MIT
php js dispatcher css dispatcher