Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tcoopman/image-webpack-loader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5343326e2ac92da6f6f513e5f891e79169faa152
Choose a base ref
...
head repository: tcoopman/image-webpack-loader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d9cca9b28d565dc3d142ea8a292c4072a684aa6d
Choose a head ref
Loading
Showing with 1,675 additions and 2,569 deletions.
  1. +5 −2 .travis.yml
  2. +9 −0 CHANGELOG.md
  3. +21 −0 LICENSE
  4. +7 −1 index.js
  5. +1,583 −2,553 package-lock.json
  6. +14 −13 package.json
  7. +36 −0 schema.json
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -5,5 +5,8 @@ before_install:
- brew outdated libpng || brew upgrade libpng
node_js:
- "node"
- "9"
- "8"
- "14"
- "13"
- "12"
- "11"
- "10"
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Change Log
All notable changes to this project will be documented in this file.

## [Unreleased]

* require node 10
* upgrade imagemin-pngquant to 9.0.1
* upgrade imagemin-webp to 6.0.0
* upgrade imagemin-mozjpeg to 9.0.0
* bump some packages for security fixes


## [6.0.0]

* upgrade imagemin-pngquant to 8.0.0 (version bump because of the api change => quality now is an array). For more info see: https://github.com/imagemin/imagemin-pngquant#quality
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Thomas Coopman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
var imagemin = require('imagemin');
var loaderUtils = require('loader-utils');
var assign = require('object-assign');
var schemaValidation = require('schema-utils')

var loaderSchema = require('./schema.json')
/**
* Basically the getLoaderConfig() function from loader-utils v0.2.
*/
@@ -37,7 +39,7 @@ module.exports = function(content) {
optipng: config.optipng || {},
svgo: config.svgo || {},
// optional optimizers
webp: config.webp || null
webp: config.webp || {}
};
// Remove in interlaced, progressive and optimizationLevel checks in new major version
if (config.hasOwnProperty('interlaced')) {
@@ -53,6 +55,10 @@ module.exports = function(content) {
this.emitWarning("DEPRECATED. Configure optipng's optimizationLevel option in its own options. (optipng.optimizationLevel)");
}

schemaValidation(loaderSchema, options, {
name: 'imageWebpackLoader'
});

var callback = this.async(),
called = false;

Loading