Skip to content

Commit

Permalink
Export optisizeSingle
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptex committed Oct 19, 2020
1 parent 7e9a6d7 commit b73c1f8
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 247 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ yarn.lock

# Config files
_config.yml
.whitesource
renovate.json

# Logo
Expand Down
24 changes: 0 additions & 24 deletions .snyk

This file was deleted.

2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
theme: jekyll-theme-slate
theme: jekyll-theme-slate
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const plugins = [
imageminMozjpeg({
quality: 70
}),
// @ts-ignore
imageminPNGquant({
quality: [0.5, 0.7]
})
Expand All @@ -49,7 +50,7 @@ const spinner = ora({
* @param {Object} params
* @param {String} file
*
* @return {Void}
* @return {Promise<void>}
*/
const optisizeSingle = async (params, file) => {
return await sharp(file)
Expand All @@ -71,7 +72,7 @@ const optisizeSingle = async (params, file) => {
*
* @param {Object} params Settings
*
* @return {Promise|undefined}
* @return {Promise}
*/
const optisize = async (params = {}) => {
const { src } = params;
Expand Down Expand Up @@ -106,3 +107,4 @@ const optisize = async (params = {}) => {
};

module.exports = optisize;
module.exports.optisizeSingle = optisizeSingle;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@three11/optisize",
"version": "1.1.0",
"version": "1.2.0",
"description": "Resize and optimize images in a folder with nodejs",
"main": "index.js",
"scripts": {
Expand Down
Loading

0 comments on commit b73c1f8

Please sign in to comment.