Skip to content

Commit f8d88ae

Browse files
committed
Fixes folder.js
1 parent bc2a0f6 commit f8d88ae

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

the-magic/build/optimize-images.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
* Gathers fullsized images in the designated images folder and reduces their filesize for use on the web and saves them ot the designated static folder using the same structure they had in the images folder
33
*/
44

5-
const path = require('path')
5+
const path = require("path")
66
const imagemin = require("imagemin-keep-folder")
7-
const imageminJpegRecompress = require('imagemin-jpeg-recompress')
7+
const imageminJpegRecompress = require("imagemin-jpeg-recompress")
88
const webp = require("imagemin-webp")
9-
const imageminOptipng = require('imagemin-optipng')
10-
const folders = require('./folder.js')
9+
const imageminOptipng = require("imagemin-optipng")
10+
const folders = require("./folders.js")
1111

1212
const PNG = path.join(folders.images_folder, `**`, `*.png`)
1313
const JPG = path.join(folders.images_folder, `**`, `*.jpg`)
@@ -16,50 +16,50 @@ const JPEG = path.join(folders.images_folder, `**`, `*.jpeg`)
1616
imagemin([PNG], {
1717
use: [
1818
webp({
19-
lossless: true
20-
})
19+
lossless: true,
20+
}),
2121
],
22-
replaceOutputDir: output => {
22+
replaceOutputDir: (output) => {
2323
return path.join(folders.static_folder, path.basename(output))
24-
}
25-
});
24+
},
25+
})
2626

2727
imagemin([PNG], {
2828
use: [
2929
imageminOptipng({
30-
optimizationLevel: 3
31-
})
30+
optimizationLevel: 3,
31+
}),
3232
],
33-
replaceOutputDir: output => {
33+
replaceOutputDir: (output) => {
3434
return path.join(folders.static_folder, path.basename(output))
35-
}
36-
});
35+
},
36+
})
3737

3838
imagemin([JPG, JPEG], {
3939
use: [
4040
webp({
41-
quality: 80 // Quality setting from 0 to 100
42-
})
41+
quality: 80, // Quality setting from 0 to 100
42+
}),
4343
],
44-
replaceOutputDir: output => {
44+
replaceOutputDir: (output) => {
4545
return path.join(folders.static_folder, path.basename(output))
46-
}
47-
});
46+
},
47+
})
4848

4949
imagemin([JPG, JPEG], {
5050
use: [
5151
imageminJpegRecompress({
5252
accurate: true,
53-
quality: 'high',
53+
quality: "high",
5454
min: 50,
5555
max: 90,
5656
loops: 6,
5757
progressive: true,
5858
strip: true,
59-
target: 0.9
60-
})
59+
target: 0.9,
60+
}),
6161
],
62-
replaceOutputDir: output => {
62+
replaceOutputDir: (output) => {
6363
return path.join(folders.static_folder, path.basename(output))
64-
}
65-
});
64+
},
65+
})

0 commit comments

Comments
 (0)