diff --git a/.gitignore b/.gitignore index 16128c4..1ba8b01 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ composer.lock /vendor/ /node_modules/ /dist/ -.idea \ No newline at end of file +.idea +**/*.min.css +**/*.min.js diff --git a/README.md b/README.md index 9ef3932..84b69ce 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ * Contributors: Stefan Kalscheuer * Tags: liveticker, feed, rss -* Requires at least: 3.8 +* Requires at least: 4.0 * Tested up to: 4.9 +* Requires PHP: 5.2 * Stable tag: 1.0.0-alpha * License: GPLv2 or later * License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/RoboFile.php b/RoboFile.php index 9d30d36..15c9a94 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -128,7 +128,7 @@ class RoboFile extends Tasks { $this->testCS(); } $this->bundle(); - $this->minify( $opts ); +// $this->minify( $opts ); } /** diff --git a/composer.json b/composer.json index 1785211..3be3a2c 100644 --- a/composer.json +++ b/composer.json @@ -31,16 +31,26 @@ "wimg/php-compatibility": "^8.0", "wp-coding-standards/wpcs": "~0.14", "patchwork/jsqueeze": "^2.0.5", - "natxet/CssMin": "^3.0.5" + "natxet/CssMin": "^3.0.5", + "matthiasmullie/minify": "^1.3" }, "scripts": { + "post-install-cmd": [ + "@minify" + ], + "post-update-cmd": [ + "@minify" + ], "build": [ + "@minify", "robo build" ], "package": [ + "@minify", "robo package" ], "deploy": [ + "@minify", "robo deploy:all" ], "test-all": [ @@ -55,6 +65,10 @@ ], "fix-cs": [ "phpcbf --standard=phpcs.xml" + ], + "minify": [ + "minifycss styles/wp-liveticker2.css > styles/wp-liveticker2.min.css", + "minifyjs scripts/wp-liveticker2.js > scripts/wp-liveticker2.min.js" ] } } diff --git a/includes/class-wpliveticker2.php b/includes/class-wpliveticker2.php index 0ceac7b..865a434 100644 --- a/includes/class-wpliveticker2.php +++ b/includes/class-wpliveticker2.php @@ -250,7 +250,7 @@ class WPLiveticker2 { if ( self::$shortcode_present || self::$widget_present ) { wp_enqueue_style( 'wplt-css', - WPLT2_BASE . 'styles/wp-liveticker2.css', + WPLT2_BASE . 'styles/wp-liveticker2.min.css', '', self::VERSION, 'all' ); @@ -265,7 +265,7 @@ class WPLiveticker2 { if ( self::$shortcode_present || self::$widget_present ) { wp_enqueue_script( 'wplt2-js', - WPLT2_BASE . 'scripts/wp-liveticker2.js', + WPLT2_BASE . 'scripts/wp-liveticker2.min.js', array( 'jquery' ), self::VERSION, true diff --git a/phpcs.xml b/phpcs.xml index a0c171d..2398be0 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -21,6 +21,6 @@ - + diff --git a/wp-liveticker2.php b/wp-liveticker2.php index bcfd46e..461a96b 100644 --- a/wp-liveticker2.php +++ b/wp-liveticker2.php @@ -11,7 +11,7 @@ * Description: A simple Liveticker for Wordpress. * Version: 1.0.0 alpha * Author: Stefan Kalscheuer - * Author URI: http://www.stklcode.de + * Author URI: https://www.stklcode.de * Text Domain: wplt2 * Domain Path: /lang * License: GPLv2 or later