engine.js
Function resize
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
resize(imgpath, outputPath, height, width, resizeAllImgs){
let withoutEnlargement = resizeAllImgs?false:true;
let minImgPath = path.join(outputPath)
if(!fs.existsSync(outputPath)){
fs.mkdirSync(outputPath, { recursive: true });
Function optimize
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
optimize(imgpath, outputPath, imgQuality, isProgressive) {
if(!fs.existsSync(outputPath)){
fs.mkdirSync(outputPath, { recursive: true });
}
fs.readdirSync(imgpath).forEach(file=>{