Skip to content

Instantly share code, notes, and snippets.

@ollietb
Forked from Dattaya/1. README.md
Created July 10, 2012 11:02
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ollietb/3082684 to your computer and use it in GitHub Desktop.
Save ollietb/3082684 to your computer and use it in GitHub Desktop.
Symfony2.1.*. How to integrate assetic lessphp filter.

Symfony2.1. How to integrate assetic lessphp filter.

  • Add the following package to your composer.json:
"require": {
    ...
    "leafo/lessphp": "dev-master",
    ...
}
  • Run php composer.phar update;
#...
assetic:
    #...
    filters:
        lessphp:
            file: %kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php
            apply_to: "\.less$"
@ollietb
Copy link
Author

ollietb commented Jul 10, 2012

I've updated this for Symfony2.1 using composer https://gist.github.com/3082684

@jaywilliams
Copy link

Once you've added those lines, you'll want to run:

php composer.phar update leafo/lessphp

@darklow
Copy link

darklow commented Dec 17, 2012

Any ideas on how to make lessphp track @import files for changes too?

@Nek-
Copy link

Nek- commented Feb 2, 2013

Thanks. Usefull :) .

@jhovanic
Copy link

Why all the files in lessphp folder inside the vendor get ignored by git ? I have to install lessphp everytime I clone the repo! :S

@Paulpro
Copy link

Paulpro commented Jun 2, 2013

Shouldn't you be installing all your vendors whenever you clone the repository. You're whole vendor folder should be .gitignore'd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment