Skip to content

Commit 2259596

Browse files
committed
feat: move back to mime-types
1 parent 683602c commit 2259596

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { mkdirSync, writeFileSync } from 'node:fs';
44
import path from 'node:path';
55
import { gzipSync } from 'node:zlib';
66

7-
import mime from 'mime';
7+
import { lookup as mimeLookup } from 'mime-types';
88

99
import { cmdLine } from './commandLine';
1010
import { greenLog, yellowLog } from './consoleColor';
@@ -31,7 +31,7 @@ console.log();
3131
console.log('Translation to header file');
3232
const longestFilename = [...files.keys()].reduce((p, c) => Math.max(c.length, p), 0);
3333
for (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, '/');

0 commit comments

Comments
 (0)