Added Photoswipe and jQuery-UI CSS minification

This commit is contained in:
Christopher Allford 2019-11-19 10:40:28 -08:00
parent 81187dc359
commit c2bc312e97
4 changed files with 35 additions and 14 deletions

3
.gitignore vendored
View File

@ -20,6 +20,9 @@ none
# Compiled CSS
/assets/css/*.css
/assets/css/photoswipe/*.min.css
/assets/css/photoswipe/default-skin/*.min.css
/assets/css/jquery-ui/*.min.css
# Minified JS
/assets/js/admin/*.min.js

View File

@ -148,11 +148,36 @@ module.exports = function( grunt ) {
// Minify all .css files.
cssmin: {
minify: {
expand: true,
cwd: '<%= dirs.css %>/',
src: ['*.css'],
dest: '<%= dirs.css %>/',
ext: '.css'
files: [
{
expand: true,
cwd: '<%= dirs.css %>/',
src: ['*.css'],
dest: '<%= dirs.css %>/',
ext: '.css'
},
{
expand: true,
cwd: '<%= dirs.css %>/jquery-ui/',
src: ['*.css', '!*.min.css'],
dest: '<%= dirs.css %>/jquery-ui/',
ext: '.min.css'
},
{
expand: true,
cwd: '<%= dirs.css %>/photoswipe/',
src: ['*.css', '!*.min.css'],
dest: '<%= dirs.css %>/photoswipe/',
ext: '.min.css'
},
{
expand: true,
cwd: '<%= dirs.css %>/photoswipe/default-skin/',
src: ['*.css', '!*.min.css'],
dest: '<%= dirs.css %>/photoswipe/default-skin/',
ext: '.min.css'
}
]
}
},

File diff suppressed because one or more lines are too long

View File

@ -307,13 +307,13 @@ class WC_Frontend_Scripts {
private static function register_styles() {
$register_styles = array(
'photoswipe' => array(
'src' => self::get_asset_url( 'assets/css/photoswipe/photoswipe.css' ),
'src' => self::get_asset_url( 'assets/css/photoswipe/photoswipe.min.css' ),
'deps' => array(),
'version' => WC_VERSION,
'has_rtl' => false,
),
'photoswipe-default-skin' => array(
'src' => self::get_asset_url( 'assets/css/photoswipe/default-skin/default-skin.css' ),
'src' => self::get_asset_url( 'assets/css/photoswipe/default-skin/default-skin.min.css' ),
'deps' => array( 'photoswipe' ),
'version' => WC_VERSION,
'has_rtl' => false,