diff --git a/CHANGELOG.md b/CHANGELOG.md index cb9aa3b..61d33e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ============== +1.4.4 +----------------- + * Variables minifier filter default false + 1.4.3.2 ----------------- * Fixed option noIncludeJsFilesOnPjax = true diff --git a/src/AssetsAutoCompressComponent.php b/src/AssetsAutoCompressComponent.php index 835166e..129f4e3 100644 --- a/src/AssetsAutoCompressComponent.php +++ b/src/AssetsAutoCompressComponent.php @@ -259,6 +259,9 @@ protected function _processing(View $view) //echo "
" . print_r($view->jsFiles, true);die;
         if ($view->jsFiles && $this->jsFileCompile) {
             \Yii::beginProfile('Compress js files');
+            /*if (YII_ENV_DEV) {
+                echo "
" . print_r($view->jsFiles, true);
+            }*/
             foreach ($view->jsFiles as $pos => $files) {
                 if ($files) {
                     if ($this->jsFileCompileByGroups) {
@@ -270,7 +273,10 @@ protected function _processing(View $view)
             }
             \Yii::endProfile('Compress js files');
         }
-        //echo "
" . print_r($view->jsFiles, true);die;
+        /*if (YII_ENV_DEV) {
+            echo "
" . print_r($view->jsFiles, true);die;
+        }*/
+        
 
         //Compiling js code that is found in the html code of the page.
         if ($view->js && $this->jsCompress) {
@@ -354,14 +360,15 @@ protected function _processAndGroupJsFiles($files = [])
 
         $result = [];
         $groupedFiles = $this->_getGroupedFiles($files);
+        /*print_r($groupedFiles);die;*/
         foreach ($groupedFiles as $files) {
             $resultGroup = $this->_processingJsFiles($files);
             $result = ArrayHelper::merge($result, $resultGroup);
         }
 
         return $result;
-        echo "
".print_r($result, true);
-        die;
+        /*echo "
".print_r($result, true);
+        die;*/
 
     }
 
@@ -630,6 +637,7 @@ protected function _processingCssFiles($files = [])
                     unset($fileCodeTmp[count($fileCodeTmp) - 1]);
                     $prependRelativePath = implode("/", $fileCodeTmp)."/";
 
+                    //print_r($prependRelativePath);die;
                     $contentTmp = \Minify_CSS::minify($contentTmp, [
                         "prependRelativePath" => $prependRelativePath,
 
@@ -664,7 +672,7 @@ protected function _processingCssFiles($files = [])
             }
 
             if ($this->cssFileCompress) {
-                $content = \CssMin::minify($content);
+                $content = \CssMin::minify($content, [], ["Variables" => false]);
             }
 
             $page = \Yii::$app->request->absoluteUrl;
@@ -703,7 +711,7 @@ protected function _processingCss($css = [])
         }
 
         $css = implode("\n", $newCss);
-        $css = \CssMin::minify($css);
+        $css = \CssMin::minify($css, [], ["Variables" => false]);
         return [md5($css) => ""];
     }