catchamonkey / assetic-filter-bundle
Catchamonkey AsseticFilterBundle
Installs: 13 392
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- kriswallsmith/assetic: 1.1.*@dev
- symfony/framework-bundle: 2.*
This package is not auto-updated.
Last update: 2024-10-12 14:08:13 UTC
README
##CatchamonkeyAsseticFilterBundle
Symfony2 bundles that provides a basic CSS minifier in the form of an assetic filter
##Installation via composer
Step 1)
composer require "catchamonkey/assetic-filter-bundle"
Step 2) Register the Bundle in your kernel
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Catchamonkey\Bundle\AsseticFilterBundle\CatchamonkeyAsseticFilterBundle(), ); }
##Usage
Using the filter is as simple as adding it to a stylesheets tag
#app/Resources/views/base.html.twig {% stylesheets filter='catchamonkey_cssmin' '@AcmeDemoBundle/Resources/public/css/*.css' %} <link rel="stylesheet" type="text/css" href="{{ asset_url }}" /> {% endstylesheets %}
Or use it in your assetic config using apply_to (added in v0.2.0)
#app/config/config.yml # Assetic Configuration assetic: debug: %kernel.debug% use_controller: false bundles: [] filters: catchamonkey_cssmin: resource: "%kernel.root_dir%/../vendor/catchamonkey/assetic-filter-bundle/Catchamonkey/Bundle/AsseticFilterBundle/Resources/config/services.xml" apply_to: "\.css$"