Minification of JS/CSS with Composer for compatibility
This commit is contained in:
parent
14a6387218
commit
358602bf48
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,4 +2,6 @@ composer.lock
|
||||
/vendor/
|
||||
/node_modules/
|
||||
/dist/
|
||||
.idea
|
||||
.idea
|
||||
**/*.min.css
|
||||
**/*.min.js
|
||||
|
@ -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
|
||||
|
@ -128,7 +128,7 @@ class RoboFile extends Tasks {
|
||||
$this->testCS();
|
||||
}
|
||||
$this->bundle();
|
||||
$this->minify( $opts );
|
||||
// $this->minify( $opts );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -21,6 +21,6 @@
|
||||
</rule>
|
||||
|
||||
<!-- PHP compatibility level -->
|
||||
<config name="testVersion" value="5.5-"/>
|
||||
<config name="testVersion" value="5.2-"/>
|
||||
<rule ref="PHPCompatibility"/>
|
||||
</ruleset>
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user