Open Svish opened 6 years ago
Hi, I consider this feature in my fork, could you try to require kylekatarnls/less.php
instead of oyejorge/less.php
and tell me if it works for you?
Thanks.
Replaced Cache.php
with yours, and... doesn't seem to do anything for this?
Looking at the diff though, and your change looks to be inside an if (!empty($modify_vars))
, and as I'm not modifying any vars at all, that probably explains why. Think the adjustment needs to be done somewhere else?
How I call the method:
File::mkdir(self::CACHE);
$this->_css = self::CACHE . Lessc::Get([ $this->_less => WEBROOT ],
[
'compress' => true,
'strictMath' => true,
'cache_dir' => self::CACHE,
'indentation' => "\t",
'import_callback' => [$this, 'find_import'],
]);
Tested it by toggling compress
on and off, and the output gets "stuck" on one until I either delete the cache (obviously) or touch one of the less files.
OK, understood the point. I will inspect that. You should be able to work-around this meanwhile by passing the compress
value also in your less variables.
Sorry I broke something, now I enable TravisCI to avoid such regression, please try with this version: https://github.com/kylekatarnls/less.php/releases/tag/v1.7.0.17
When I change options (like
'compress' => true / false
), theLess_Cache::get
doesn't seem to care and just reuses its cache. 😕This is a bit annoying, especially for me who's trying to figure out how to use this thing. 😛
Would it be possible for the
Less_Cache::get
method to also take into account its given options when deciding if it needs to re-compile?