Download the PHP package ajaxray/gulp-buster-bundle without Composer
On this page you can find all versions of the php package ajaxray/gulp-buster-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ajaxray/gulp-buster-bundle
More information about ajaxray/gulp-buster-bundle
Files in ajaxray/gulp-buster-bundle
Package gulp-buster-bundle
Short Description Symfony Bundle to integrate gulp-buster npm package for cache busting
License MIT
Homepage http://github.com/ajaxray/GulpBusterBundle
Informations about the package gulp-buster-bundle
GulpBusterBundle
When using gulp to manage assets of a Symfony application, this Bundle will help in cache busting with help of gulp-buster package.
Installation
Install the latest version with
Then enable the bundle in AppKernel -
How to use
Assuming you are using gulp-buster to generate hashes for your web assets (javascript, css, images etc. static resources).
Now the next thing is using those hashes with your web assets. This bundle will make it easy by adding a Twig Filter. Here is how to use this filter in Twig views -
If a hash is found for this file, it will be appended as query string with it's url -
If no hash found for this file -
That's all :)
Configuration
By default, this bundle assumes the following paths -
- busters.json (or any other name) file :
%kernel.root_dir%/../busters.json
- web dir:
%kernel.root_dir%/../web
- gulp dir (the dir of your gulpfile.js):
%kernel.root_dir%/..
If any/all of the above is different for you, you can configure from your app/config/config.yml
file using following keys -