From cad72218d3b7225a5ca8be87e3cdfcab09b11227 Mon Sep 17 00:00:00 2001 From: gtbu <60353863+g7sim@users.noreply.github.com> Date: Wed, 26 Apr 2023 15:29:03 +0200 Subject: [PATCH] faster compiling with $tmpcomp --- include/tool/Output/Css.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/tool/Output/Css.php b/include/tool/Output/Css.php index f813a6c..6130a84 100644 --- a/include/tool/Output/Css.php +++ b/include/tool/Output/Css.php @@ -200,7 +200,8 @@ class Css{ } - $compiled = $compiler->compileString(implode("\n", $combined))->getCss(); + $tmpcomp = $compiler->compileString(implode("\n", $combined)); + $compiled = $tmpcomp->getCss(); }catch( \Exception $e){ if( \gp\tool::LoggedIn() ){ @@ -209,9 +210,9 @@ class Css{ return false; } - $includedFiles = $compiler->compileString(implode("\n", $combined))->getIncludedFiles(); - $sourceMap = $compiler->compileString(implode("\n", $combined))->getSourceMap(); - + $includedFiles = $tmpcomp->getIncludedFiles(); + $sourceMap = $tmpcomp->getSourceMap(); + $scss_files = $includedFiles; return [$compiled, $temp_sourcemap_name];