File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { mkdirSync, writeFileSync } from 'node:fs';
4
4
import path from 'node:path' ;
5
5
import { gzipSync } from 'node:zlib' ;
6
6
7
- import mime from 'mime' ;
7
+ import { lookup as mimeLookup } from 'mime-types ' ;
8
8
9
9
import { cmdLine } from './commandLine' ;
10
10
import { greenLog , yellowLog } from './consoleColor' ;
@@ -31,7 +31,7 @@ console.log();
31
31
console . log ( 'Translation to header file' ) ;
32
32
const longestFilename = [ ...files . keys ( ) ] . reduce ( ( p , c ) => Math . max ( c . length , p ) , 0 ) ;
33
33
for ( const [ originalFilename , content ] of files ) {
34
- const mimeType = mime . getType ( originalFilename ) || 'text/plain' ;
34
+ const mimeType = mimeLookup ( originalFilename ) || 'text/plain' ;
35
35
summary . filecount ++ ;
36
36
37
37
const filename = originalFilename . replace ( / \\ / g, '/' ) ;
You can’t perform that action at this time.
0 commit comments