Skip to content

Commit

Permalink
Merge pull request #15 from ilovepdf/develop
Browse files Browse the repository at this point in the history
v2.0.3
  • Loading branch information
diegocrombie authored Mar 7, 2024
2 parents 401bdac + f1ecd33 commit 4956dc6
Show file tree
Hide file tree
Showing 14 changed files with 138 additions and 140 deletions.
6 changes: 3 additions & 3 deletions admin/Ilove_Img_Compress_Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Ilove_Img_Compress_Plugin {
* @access public
* @var string VERSION The current version of the plugin.
*/
const VERSION = '2.0.2';
const VERSION = '2.0.3';

/**
* The unique identifier of this plugin.
Expand Down Expand Up @@ -104,7 +104,7 @@ public function enqueue_scripts() {
// Enqueue the main JavaScript file.
wp_enqueue_script(
self::NAME . '_admin',
plugins_url( '/assets/js/main.js', __DIR__ ),
plugins_url( '/assets/js/main.min.js', __DIR__ ),
array(),
self::VERSION,
true
Expand All @@ -113,7 +113,7 @@ public function enqueue_scripts() {
// Enqueue the main CSS file.
wp_enqueue_style(
self::NAME . '_admin',
plugins_url( '/assets/css/app.css', __DIR__ ),
plugins_url( '/assets/css/app.min.css', __DIR__ ),
array(),
self::VERSION
);
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions assets/js/main.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
},
"scripts": {
"stan": "vendor/bin/phpstan analyse --memory-limit=-1 --error-format=table > ../../../phpstan-report-iloveimg.txt",
"phpcs-summary": "phpcs -s --report=summary --ignore=*/vendor/*,*/iloveimg-php/*,*/.github/*,*/assets/css/* --report-file=../../../condesniffer-report-summary-iloveimg.txt ./",
"phpcs": "phpcs -s --ignore=*/vendor/*,*/iloveimg-php/*,*/.github/*,*/assets/css/* --report-file=../../../condesniffer-report-iloveimg.txt ./",
"phpcbf": "phpcbf --ignore=vendor/,iloveimg-php/,.github/ ./",
"phpcs-summary": "phpcs -s --report=summary --ignore=*/node_modules/*,*/vendor/*,*/iloveimg-php/*,*/.github/*,*/assets/css/*,*/assets/js/* --report-file=../../../condesniffer-report-summary-iloveimg.txt ./",
"phpcs": "phpcs -s --ignore=*/node_modules/*,*/vendor/*,*/iloveimg-php/*,*/.github/*,*/assets/js/*,*/assets/css/* --report-file=../../../condesniffer-report-iloveimg.txt ./",
"phpcbf": "phpcbf --ignore=node_modules/,vendor/,iloveimg-php/,assets/js/,assets/css/,.github/ ./",
"autoload-dev": "composer dump-autoload",
"autoload-prod": "composer dump-autoload --no-dev"
},
Expand Down
47 changes: 0 additions & 47 deletions dev/gulpfile.js

This file was deleted.

File renamed without changes.
28 changes: 0 additions & 28 deletions dev/package.json

This file was deleted.

44 changes: 44 additions & 0 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import gulp from 'gulp';
import gulpSass from 'gulp-sass';
import cleanCSS from 'gulp-clean-css';
import autoprefixer from 'gulp-autoprefixer';
import * as sassCompiler from 'sass';
import uglify from 'gulp-uglify';
import rename from 'gulp-rename';
import merge from 'merge-stream';

const sass = gulpSass(sassCompiler);

// Task to compile Sass and minify CSS
gulp.task('build-css', function() {
return gulp.src('dev/scss/**/*.scss')
.pipe(sass.sync().on('error', sass.logError))
.pipe(autoprefixer({
overrideBrowserslist: ["last 2 versions"],
cascade: false,
}))
.pipe(cleanCSS())
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('assets/css'));
});

// Task to compile and minify JavaScript
gulp.task('build-js', function() {
// Process main.js in this file you can import others files js
const mainJsStream = gulp.src('dev/js/main.js')
.pipe(uglify())
.pipe(rename({ suffix: '.min' })) // Rename file to main.min.js
.pipe(gulp.dest('assets/js'));

// Return a merged stream to signal completion
return merge(mainJsStream);
});

// Task to watch for changes in Sass files
gulp.task('watch', function() {
gulp.watch('dev/scss/**/*.scss', gulp.series('build-css'));
gulp.watch('dev/js/**/*.js', gulp.series('build-js'));
});

// Default task
gulp.task('default', gulp.series('build-css', 'build-js', 'watch'));
2 changes: 1 addition & 1 deletion ilove-img-compress.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Plugin Name: Image Compressor & Optimizer - iLoveIMG
* Plugin URI: https://developer.iloveimg.com/
* Description: Get your images delivered quickly. Now you can get a powerful, easy to use, and reliable image compression plugin for your image optimization needs. With full automation and powerful features, iLoveIMG makes it easy to speed up your website by lightening past and new images with just a click. Compress JPG, PNG and GIF images in your WordPress to improve the positioning of your site, boost visitor’s engagement and ultimately increase sales.
* Version: 2.0.2
* Version: 2.0.3
* Requires at least: 5.3
* Requires PHP: 7.4
* Author: iLoveIMG
Expand Down
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "iloveimg-wp-compress",
"version": "1.0.0",
"description": "=== Best Compress - Get your images delivered quickly. Now you can get a powerful, easy to use, and reliable image compression plugin for your image optimization needs. With full automation and powerful features, iLoveIMG makes it easy to speed up your website by lightening past and new images with just a click. Compress JPG, PNG and GIF images in your WordPress to improve the positioning of your site, boost visitor’s engagement and ultimately increase sales.",
"main": "index.js",
"scripts": {
"dev": "gulp"
},
"author": "ilovepdf",
"license": "ISC",
"devDependencies": {
"gulp": "^4.0.2",
"gulp-autoprefixer": "^9.0.0",
"gulp-clean-css": "^4.3.0",
"gulp-rename": "^2.0.0",
"gulp-sass": "^5.1.0",
"gulp-uglify": "^3.0.2",
"merge-stream": "^2.0.0",
"sass": "^1.71.1"
}
}
11 changes: 8 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
=== Image Compressor & Optimizer - iLoveIMG ===
Plugin Name: Image Compressor & Optimizer - iLoveIMG
Version: 2.0.2
Version: 2.0.3
Author: iLovePDF
Author URI: https://www.iloveimg.com/
Contributors: iLovePDF
Tags: compress, image, optimize, performance, image optimizer
Requires at least: 5.3
Tested up to: 6.4.2
Stable tag: 2.0.2
Tested up to: 6.4.3
Stable tag: 2.0.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -81,6 +81,11 @@ Moreover, all processed files are automatically deleted from our servers after b

== Changelog ==

== 2.0.3 ==
Added
* Update libraries.
* Assets files were optimized.

== 2.0.2 ==
Added
* Update iloveimg-php library
Expand Down
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
=== Image Compressor & Optimizer - iLoveIMG ===
Plugin Name: Image Compressor & Optimizer - iLoveIMG
Version: 2.0.2
Version: 2.0.3
Author: iLovePDF
Author URI: https://www.iloveimg.com/
Contributors: iLovePDF
Tags: compress, image, optimize, performance, image optimizer
Requires at least: 5.3
Tested up to: 6.4.2
Stable tag: 2.0.2
Tested up to: 6.4.3
Stable tag: 2.0.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -80,6 +80,11 @@ Moreover, all processed files are automatically deleted from our servers after b

== Changelog ==

== 2.0.3 ==
Added
* Update libraries.
* Assets files were optimized.

== 2.0.2 ==
Added
* Update iloveimg-php library
Expand Down
Loading

0 comments on commit 4956dc6

Please sign in to comment.