News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sftuts.com:
Using Assetic in Symfony2 for CSS compression
April 19, 2011 @ 11:55:33

On Sftuts.com today Albert Jessurum has taken a look at Assetic, a tool included in the upcoming Symfony2 framework, as a means for compressing the CSS on a site. It's a simple four-step process and he includes each command you'll need along the way.

Symfony Standard comes bundled with a great library called Assetic for Assets Management in PHP 5.3 (CSS, js, and even image optimization coming soon) developed by Kris Wallsmith. We will be using it to compress our CSS files, thus reducing the time required to download stylesheets in our Symfony2 projects.

The steps are pretty simple (especially if you're at all familiar with Symfony):

  • Install the YUI Compressor
  • Change the way you call your assets
  • Edit your configuration file
  • Dump your assets for production

You'll need to have an installation of Symfony2 already set up and running - there's no steps included on that setup.

0 comments voice your opinion now!
assetic symfony css compression


blog comments powered by Disqus

Similar Posts

Stefan Koopmanschap's Blog: An Open Letter To The phpBB Community

Symfony Blog: Static Page Caching & Payment Validators in Symfony 2.2

Benjamin Eberlei's Blog: Using Symfony Dependency Injection with Zend_Application

Jeune Asuncion: ZF1.11 + Doctrine 2 + Symfony DI Integration

International PHP Magazine: Poll: Which is your favorite trick in running Symfony with Subversion?


Community Events





Don't see your event here?
Let us know!


unittest framework install laravel list testing refactor configure series introduction threedevsandamaybe interview community opinion symfony2 podcast release developer language code

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework