php - How to install lessphp to be used in the assetic framework? -


i cannot find way add lessphp files project assetic finds them. not wish add require sentences assetic files or modify them in way future updates made.

i error:

fatal error: class 'lessc' not found in ....../kriswallsmith/assetic/src/assetic/filter/lessphpfilter.php on line 87 

the code on line lessc intantiation:

  $lc = new \lessc(); 

note: cannot use composer install since composer brings issues project.

assetic not import lessc.inc.php you. have manually.

i assume using assetic standalone in application, should doing this:

<?php  use assetic\asset\assetcollection; use assetic\asset\fileasset; use assetic\filter\lessphpfilter;  require "path/to/lessc.inc.php"; // should include  $css = new assetcollection(array(     new fileasset('/path/to/src/styles.less', array(new lessphpfilter())), )); echo $css->dump(); 

but causalities using symfony2, should configure lessphp filter in app/config/config.yml this:

assetic:     debug:          %kernel.debug%     use_controller: false     bundles:        []     filters:        cssrewrite: ~        lessphp:            file: "%kernel.root_dir%/../vendor/leafo/lessphp/lessc.inc.php"            apply_to: "\.less$" 

let me know.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -