Search code examples
phpsymfonysassasseticsymfony-2.8

Symfony2, Assetic, Compass, and SASS


I've been looking all over for a good, recent tutorial on how to hook up SASS within symfony (specifically 2.8). It looks like there are no tutorials newer that 2011. Is this because there's some reason I shouldn't be using SASS with Symfony? If there is a way to set this up easily, could someone point me in the right direction. I have Compass and SASS installed on my machine (along with the assetic bundle for Symfony).


Solution

  • Symfony 2.8 no longer includes Assetic by default, but there are instructions available to install and enable it. (Basically: add symfony/assetic-bundle to your composer.json and add the necessary configuration.)

    The best practice these days seems to be to use frontend tools specifically focused for frontend development. (The Symfony best practices document specifically recommends GruntJS, but it's not the only solution.)