sayme / gulp-rev-bundle
The GulpRevBundle adds a simple twig filter for files revisioned with gulp-rev.
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- symfony/framework-bundle: ~2.3|~3.0
This package is auto-updated.
Last update: 2021-03-23 12:23:21 UTC
README
The GulpRevBundle adds a simple twig filter for files revisioned with gulp-rev.
Download and install GulpRevBundle
To install GulpRevBundle run the following command:
$ php composer.phar require sayme/gulp-rev-bundle
Enable the bundle
Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Sayme\GulpRevBundle\SaymeGulpRevBundle(), ); }
Changing the manifest_path and build_directory
Below are the default settings. You can change them to whatever you prefer.
# app/config/config.yml sayme_gulp_rev: manifest_path: "%kernel.root_dir%/Resources/rev-manifest.json" build_dir: "build"
Usage
Add the asset_rev filter to your twig asssets.
<script src="{{ asset('js/app.js'|asset_rev) }}"></script>