File tree 3 files changed +7
-10186
lines changed
3 files changed +7
-10186
lines changed Original file line number Diff line number Diff line change 1
- const path = require ( 'path' )
2
- const util = require ( 'util' )
3
- const glob = require ( 'glob' )
1
+ const path = require ( 'node:path' )
2
+ const { glob} = require ( 'glob' )
4
3
const sharp = require ( 'sharp' )
5
4
const mkdirp = require ( 'mkdirp' )
6
5
@@ -60,12 +59,10 @@ module.exports = class {
60
59
61
60
async loadImages ( imgFolder ) {
62
61
const cwd = path . resolve ( imgFolder . file )
63
- const getImages = util . promisify ( glob )
62
+ const getImages = glob
64
63
const processedImages = [ ]
65
-
66
64
const imgs = await getImages ( '**/*(*.jpg|*.png|*.gif)' , { cwd } )
67
65
const imgsRendered = await getImages ( '**/*(*.jpg|*.png|*.gif)' , { cwd : outputPath } )
68
-
69
66
for ( const img of imgs ) {
70
67
const ext = path . extname ( img )
71
68
const base = path . basename ( img , ext )
Original file line number Diff line number Diff line change 53
53
"markdown-it-container" : " ^3.0.0" ,
54
54
"markdown-it-footnote" : " ^3.0.3" ,
55
55
"moment" : " ^2.29.4" ,
56
+ "npm-check-updates" : " ^16.6.0" ,
56
57
"npm-run-all" : " ^4.1.5" ,
57
58
"qrcode" : " ^1.5.1" ,
58
59
"sass" : " ^1.56.2" ,
59
- "sharp" : " ^0.31.2 " ,
60
+ "sharp" : " ^0.33.4 " ,
60
61
"shx" : " ^0.3.4" ,
61
- "npm-check-updates" : " ^16.6.0" ,
62
+ "glob" : " ^10.4.1" ,
63
+ "mkdirp" : " ^3.0.1" ,
62
64
"xo" : " ^0.53.1"
63
65
}
64
66
}
You can’t perform that action at this time.
0 commit comments