@@ -75,7 +75,7 @@ export async function isRecord(pathDir: string) {
7575
7676export async function record ( pathDir : string ) {
7777 const isExist = await isFileExist ( RecordFilePath )
78- const fileName = getFIleName ( pathDir )
78+ const fileName = getFileName ( pathDir )
7979 if ( isExist ) {
8080 const json : Object = fse . readJSONSync ( RecordFilePath )
8181 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -91,7 +91,7 @@ export async function record(pathDir: string) {
9191export async function removeRecord ( pathDir : string ) {
9292 const RecordFilePath = path . resolve ( cwd ( ) , 'record.json' )
9393 const isExist = await isFileExist ( RecordFilePath )
94- const fileName = getFIleName ( pathDir )
94+ const fileName = getFileName ( pathDir )
9595 if ( isExist ) {
9696 const json : Object = fse . readJSONSync ( RecordFilePath )
9797 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -101,7 +101,7 @@ export async function removeRecord(pathDir: string) {
101101 }
102102}
103103
104- export function getFIleName ( pathDir : string ) {
104+ export function getFileName ( pathDir : string ) {
105105 return path . basename ( pathDir )
106106}
107107
@@ -110,7 +110,7 @@ export function getExtName(pathDir: string) {
110110}
111111
112112export function autoRecord ( action : 'add' | 'unlink' | 'change' , pathDir : string ) {
113- if ( ! isImageFIle ( pathDir ) )
113+ if ( ! isImageFile ( pathDir ) )
114114 return
115115
116116 if ( action === 'add' )
@@ -120,7 +120,7 @@ export function autoRecord(action: 'add' | 'unlink' | 'change', pathDir: string)
120120 removeRecord ( pathDir )
121121}
122122
123- export function isImageFIle ( pathDir : string ) {
123+ export function isImageFile ( pathDir : string ) {
124124 const fileExtname = getExtName ( pathDir )
125125 const supportFiles = [ 'webp' , 'jpeg' , 'png' ]
126126 return supportFiles . includes ( fileExtname )
@@ -131,7 +131,7 @@ export async function reduceImage(fileDir: string, targetDir: string) {
131131 if ( recorded )
132132 return
133133
134- if ( ! isImageFIle ( fileDir ) )
134+ if ( ! isImageFile ( fileDir ) )
135135 return
136136 const spinner = ora ( 'Loading' ) . start ( )
137137 try {
0 commit comments