From 471cf7fe312dd08684f3460da7f8ecce69d012f0 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Tue, 31 May 2016 11:29:37 -0600 Subject: [PATCH] Removed references to mcrclay/minify's CSS and JS min --- system/blueprints/config/system.yaml | 22 -------------- system/config/system.yaml | 2 -- system/src/Grav/Common/Assets.php | 32 ++++---------------- system/src/Grav/Console/Cli/CleanCommand.php | 16 ---------- 4 files changed, 6 insertions(+), 66 deletions(-) diff --git a/system/blueprints/config/system.yaml b/system/blueprints/config/system.yaml index 3cb2aca20..e6ea38cc3 100644 --- a/system/blueprints/config/system.yaml +++ b/system/blueprints/config/system.yaml @@ -622,17 +622,6 @@ form: validate: type: bool - assets.css_minify_old: - type: toggle - label: PLUGIN_ADMIN.CSS_MINIFY_OLD - help: PLUGIN_ADMIN.CSS_MINIFY_OLD_HELP - highlight: 0 - options: - 1: PLUGIN_ADMIN.YES - 0: PLUGIN_ADMIN.NO - validate: - type: bool - assets.css_minify_windows: type: toggle label: PLUGIN_ADMIN.CSS_MINIFY_WINDOWS_OVERRIDE @@ -699,17 +688,6 @@ form: validate: type: bool - assets.js_minify_old: - type: toggle - label: PLUGIN_ADMIN.JAVASCRIPT_MINIFY_OLD - help: PLUGIN_ADMIN.JAVASCRIPT_MINIFY_OLD_HELP - highlight: 0 - options: - 1: PLUGIN_ADMIN.YES - 0: PLUGIN_ADMIN.NO - validate: - type: bool - assets.enable_asset_timestamp: type: toggle label: PLUGIN_ADMIN.ENABLED_TIMESTAMPS_ON_ASSETS diff --git a/system/config/system.yaml b/system/config/system.yaml index 18a357500..0733e599a 100644 --- a/system/config/system.yaml +++ b/system/config/system.yaml @@ -86,14 +86,12 @@ assets: # Configuration for Assets Manager ( css_pipeline_include_externals: true # Include external URLs in the pipeline by default css_pipeline_before_excludes: true # Render the pipeline before any excluded files css_minify: true # Minify the CSS during pipelining - css_minify_old: false # Use the previous Minify library for CSS (if having issues) css_minify_windows: false # Minify Override for Windows platforms. False by default due to ThreadStackSize css_rewrite: true # Rewrite any CSS relative URLs during pipelining js_pipeline: false # The JS pipeline is the unification of multiple JS resources into one file js_pipeline_include_externals: true # Include external URLs in the pipeline by default js_pipeline_before_excludes: true # Render the pipeline before any excluded files js_minify: true # Minify the JS during pipelining - js_minify_old: false # Use the previous Minify library for JS (if having issues) enable_asset_timestamp: false # Enable asset timestamps collections: jquery: system://assets/jquery/jquery-2.x.min.js diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index 7dbfdf786..cf3cece0f 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -83,11 +83,9 @@ class Assets // Default values for pipeline settings protected $css_minify = true; - protected $css_minify_old = false; protected $css_minify_windows = false; protected $css_rewrite = true; protected $js_minify = true; - protected $js_minify_old = false; // Arrays to hold assets that should NOT be pipelined protected $css_no_pipeline = []; @@ -160,11 +158,6 @@ class Assets $this->css_minify = $config['css_minify']; } - if (isset($config['css_minify_old'])) { - $this->css_minify_old = $config['css_minify_old']; - } - - if (isset($config['css_minify_windows'])) { $this->css_minify_windows = $config['css_minify_windows']; } @@ -178,10 +171,6 @@ class Assets $this->js_minify = $config['js_minify']; } - if (isset($config['js_minify_old'])) { - $this->js_minify_old = $config['js_minify_old']; - } - // Set collections if (isset($config['collections']) && is_array($config['collections'])) { $this->collections = $config['collections']; @@ -740,14 +729,9 @@ class Assets // Concatenate files $buffer = $this->gatherLinks($temp_css, CSS_ASSET); if ($css_minify) { - if ($this->css_minify_old) { - $min = new \CSSmin(); - $buffer = $min->run($buffer); - } else { - $minifier = new \MatthiasMullie\Minify\CSS(); - $minifier->add($buffer); - $buffer = $minifier->minify(); - } + $minifier = new \MatthiasMullie\Minify\CSS(); + $minifier->add($buffer); + $buffer = $minifier->minify(); } // Write file @@ -820,13 +804,9 @@ class Assets // Concatenate files $buffer = $this->gatherLinks($temp_js, JS_ASSET); if ($this->js_minify) { - if ($this->js_minify_old) { - $buffer = \JSMin::minify($buffer); - } else { - $minifier = new \MatthiasMullie\Minify\JS(); - $minifier->add($buffer); - $buffer = $minifier->minify(); - } + $minifier = new \MatthiasMullie\Minify\JS(); + $minifier->add($buffer); + $buffer = $minifier->minify(); } // Write file diff --git a/system/src/Grav/Console/Cli/CleanCommand.php b/system/src/Grav/Console/Cli/CleanCommand.php index 1c2620814..17fecb5fb 100644 --- a/system/src/Grav/Console/Cli/CleanCommand.php +++ b/system/src/Grav/Console/Cli/CleanCommand.php @@ -94,7 +94,6 @@ class CleanCommand extends Command 'vendor/matthiasmullie/minify/bin', 'vendor/matthiasmullie/minify/composer.json', 'vendor/matthiasmullie/minify/CONTRIBUTING.md', - 'vendor/matthiasmullie/minify/data', 'vendor/matthiasmullie/path-converter/composer.json', 'vendor/maximebf/debugbar/bower.json', 'vendor/maximebf/debugbar/composer.json', @@ -108,21 +107,6 @@ class CleanCommand extends Command 'vendor/monolog/monolog/doc', 'vendor/monolog/monolog/phpunit.xml.dist', 'vendor/monolog/monolog/tests', - 'vendor/mrclay/minify/.editorconfig', - 'vendor/mrclay/minify/.git', - 'vendor/mrclay/minify/.gitignore', - 'vendor/mrclay/minify/composer.json', - 'vendor/mrclay/minify/min_extras', - 'vendor/mrclay/minify/min_unit_tests', - 'vendor/mrclay/minify/min/.htaccess', - 'vendor/mrclay/minify/min/builder', - 'vendor/mrclay/minify/min/config-test.php', - 'vendor/mrclay/minify/min/config.php', - 'vendor/mrclay/minify/min/groupsConfig.php', - 'vendor/mrclay/minify/min/index.php', - 'vendor/mrclay/minify/min/quick-test.css', - 'vendor/mrclay/minify/min/quick-test.js', - 'vendor/mrclay/minify/min/utils.php', 'vendor/pimple/pimple/.gitignore', 'vendor/pimple/pimple/.travis.yml', 'vendor/pimple/pimple/composer.json',