Compile LESS/SCSS again if variables change

This commit is contained in:
Kijin Sung 2016-05-05 10:42:15 +09:00
parent a7f0ba1964
commit 67cc7d3d00
2 changed files with 13 additions and 10 deletions

View file

@ -268,7 +268,7 @@ class FrontEndFileHandler extends Handler
}
$compiledFileName = $file->fileName . ($minify ? '.min' : '') . '.css';
$compiledFileHash = ltrim(str_replace(array('/', '\\'), '.', substr($file->fileRealPath, strlen(\RX_BASEDIR))), '.');
$compiledFileHash = sha1($file->fileRealPath . ':' . serialize($vars));
$compiledFilePath = \RX_BASEDIR . self::$assetdir . '/compiled/' . $compiledFileHash . '.' . $compiledFileName;
if (!file_exists($compiledFilePath) || filemtime($compiledFilePath) < filemtime($file->fileFullPath))