1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 10:11:43 +02:00

Minify each JS file individually, caching the result

This means that the expensive minification process will only be run for a file if it hasn't before. Greatly speeds up extension enabling/disabling.

Also:
- Don't check file last modification times in production for a bit of extra perf.
- Only flush CSS when theme settings are changed. This speeds up the page reload a bit.
This commit is contained in:
Toby Zerner
2015-10-09 01:52:51 +10:30
parent 18def302d6
commit 6f1c46819e
10 changed files with 149 additions and 62 deletions

View File

@@ -23,11 +23,12 @@ class LessCompiler extends RevisionCompiler
/**
* @param string $path
* @param string $filename
* @param bool $watch
* @param string $cachePath
*/
public function __construct($path, $filename, $cachePath)
public function __construct($path, $filename, $watch, $cachePath)
{
parent::__construct($path, $filename);
parent::__construct($path, $filename, $watch);
$this->cachePath = $cachePath;
}