Import additional composer dependencies

This commit is contained in:
Kijin Sung 2016-01-13 14:03:48 +09:00
parent 01dd26783f
commit c3dc2c68f3
439 changed files with 67918 additions and 138 deletions

View file

@ -314,6 +314,10 @@ class CSS extends Minify
// restore the string we've extracted earlier
$css = $this->restoreExtractedData($css);
$source = $source ?: '';
$css = $this->combineImports($source, $css);
$css = $this->importFiles($source, $css);
/*
* If we'll save to a new path, we'll have to fix the relative paths
* to be relative no longer to the source file, but to the new path.
@ -321,15 +325,9 @@ class CSS extends Minify
* conversion happens (because we still want it to go through most
* of the move code...)
*/
$source = $source ?: '';
$converter = new Converter($source, $path ?: $source);
$css = $this->move($converter, $css);
// if no target path is given, relative paths were not converted, so
// they'll still be relative to the source file then
$css = $this->importFiles($path ?: $source, $css);
$css = $this->combineImports($path ?: $source, $css);
// combine css
$content .= $css;
}
@ -522,11 +520,12 @@ class CSS extends Minify
* Strip comments from source code.
*
* @param string $content
*
* @return string
*/
protected function stripEmptyTags($content)
{
return preg_replace('/(^|\})[^\{]+\{\s*\}/', '\\1', $content);
return preg_replace('/(^|\})[^\{\}]+\{\s*\}/', '\\1', $content);
}
/**