mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-02 17:55:07 +00:00
12 lines
494 B
TypeScript
12 lines
494 B
TypeScript
import { FileCategory } from './types'
|
|
|
|
export function categorizeFile(filePath: string): FileCategory {
|
|
if (filePath.includes('.test.')) return 'test'
|
|
if (filePath.endsWith('.tsx')) return 'component'
|
|
if (filePath.includes('/tools/')) return 'tool'
|
|
if (filePath.includes('/dbal/')) return 'dbal'
|
|
if (filePath.includes('/types/') || filePath.endsWith('.d.ts')) return 'type'
|
|
if (filePath.includes('/lib/') && filePath.endsWith('.ts')) return 'library'
|
|
return 'other'
|
|
}
|