mirror of
https://github.com/mrclay/minify.git
synced 2025-08-08 07:06:49 +02:00
add base directory of input file to import path
this is needed for @import to be able to resolve included files
This commit is contained in:
@@ -145,6 +145,12 @@ class Minify_ScssCssSource extends Minify_Source {
|
|||||||
{
|
{
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
$scss = new Compiler();
|
$scss = new Compiler();
|
||||||
|
|
||||||
|
// set import path directory the input filename resides
|
||||||
|
// otherwise @import statements will not find the files
|
||||||
|
// and will treat the @import line as css import
|
||||||
|
$scss->setImportPaths(dirname($filename));
|
||||||
|
|
||||||
$css = $scss->compile(file_get_contents($filename), $filename);
|
$css = $scss->compile(file_get_contents($filename), $filename);
|
||||||
$elapsed = round((microtime(true) - $start), 4);
|
$elapsed = round((microtime(true) - $start), 4);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user