Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: move back to mime-types
  • Loading branch information
BCsabaEngine committed Jan 26, 2025
commit 2259596c71dc0dd7a5bd761c8e149662efcc5489
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { mkdirSync, writeFileSync } from 'node:fs';
import path from 'node:path';
import { gzipSync } from 'node:zlib';

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

import { cmdLine } from './commandLine';
import { greenLog, yellowLog } from './consoleColor';
Expand All @@ -31,7 +31,7 @@ console.log();
console.log('Translation to header file');
const longestFilename = [...files.keys()].reduce((p, c) => Math.max(c.length, p), 0);
for (const [originalFilename, content] of files) {
const mimeType = mime.getType(originalFilename) || 'text/plain';
const mimeType = mimeLookup(originalFilename) || 'text/plain';
summary.filecount++;

const filename = originalFilename.replace(/\\/g, '/');
Expand Down