alpixel / assetversionbundle
This bundle is used by our team to versionnize assets
Installs: 5 531
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.0
- symfony/symfony: ~2.8|~3.0
This package is not auto-updated.
Last update: 2024-11-09 20:12:17 UTC
README
Since Symfony 3.3, you should use http://symfony.com/blog/new-in-symfony-3-3-manifest-based-asset-versioning
Installation
- Install the package
composer require 'alpixel/assetversionbundle'
- Update AppKernel.php
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Alpixel\Bundle\AssetVersionBundle\AlpixelAssetVersionBundle(),
);
// ...
}
// ...
}
Configuration
Use gulp and gulp-rev or an other service to generate your assets revised files then call your asset in your template file using our twig extension :
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset('css/vendor.min.css'|asset_version) }}" />