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';
44import path from 'node:path' ;
55import { gzipSync } from 'node:zlib' ;
66
7- import mime from 'mime' ;
7+ import { lookup as mimeLookup } from 'mime-types ' ;
88
99import { cmdLine } from './commandLine' ;
1010import { greenLog , yellowLog } from './consoleColor' ;
@@ -31,7 +31,7 @@ console.log();
3131console . log ( 'Translation to header file' ) ;
3232const longestFilename = [ ...files . keys ( ) ] . reduce ( ( p , c ) => Math . max ( c . length , p ) , 0 ) ;
3333for ( const [ originalFilename , content ] of files ) {
34- const mimeType = mime . getType ( originalFilename ) || 'text/plain' ;
34+ const mimeType = mimeLookup ( originalFilename ) || 'text/plain' ;
3535 summary . filecount ++ ;
3636
3737 const filename = originalFilename . replace ( / \\ / g, '/' ) ;
You can’t perform that action at this time.
0 commit comments