|
1 | 1 | 'use client' |
2 | 2 |
|
3 | | - |
4 | 3 | export const LANGUAGE_MAP: Record<string, string> = { |
5 | 4 | '.js': 'javascript', |
6 | 5 | '.mjs': 'javascript', |
@@ -83,31 +82,37 @@ export const LANGUAGE_MAP: Record<string, string> = { |
83 | 82 | '.babelrc': 'json', |
84 | 83 | '.editorconfig': 'ini', |
85 | 84 | '.buckconfig': 'toml', |
86 | | - '.swcrc': 'json', |
| 85 | + '.swcrc': 'json' |
87 | 86 | } |
88 | 87 |
|
89 | | - |
90 | 88 | export const SPECIAL_FILE_MAP: Record<string, string> = { |
91 | | - 'dockerfile': 'dockerfile', |
92 | | - 'rakefile': 'ruby', |
93 | | - 'gemfile': 'ruby', |
94 | | - 'podfile': 'ruby', |
95 | | - 'fastfile': 'ruby', |
96 | | - 'cartfile': 'swift', |
| 89 | + dockerfile: 'dockerfile', |
| 90 | + rakefile: 'ruby', |
| 91 | + gemfile: 'ruby', |
| 92 | + podfile: 'ruby', |
| 93 | + fastfile: 'ruby', |
| 94 | + cartfile: 'swift', |
97 | 95 | 'package.json': 'json', |
98 | 96 | 'tsconfig.json': 'json', |
99 | 97 | 'composer.json': 'json', |
100 | 98 | 'pom.xml': 'xml', |
101 | 99 | 'build.gradle': 'groovy', |
102 | 100 | 'settings.gradle': 'groovy', |
103 | | - 'buck': 'python', |
104 | | - 'makefile': 'makefile', |
| 101 | + buck: 'python', |
| 102 | + bzl: 'python', |
| 103 | + build: 'python', |
| 104 | + workspace: 'python', |
| 105 | + 'workspace.bazel': 'python', |
| 106 | + 'build.bazel': 'python', |
| 107 | + '.bazelrc': 'ini', |
| 108 | + '.buckconfig': 'toml', |
| 109 | + '.buckversion': 'text', |
| 110 | + makefile: 'makefile', |
105 | 111 | 'makefile.linux': 'makefile', |
106 | 112 | 'makefile.win': 'makefile', |
107 | | - 'makefile.mac': 'makefile', |
| 113 | + 'makefile.mac': 'makefile' |
108 | 114 | } |
109 | 115 |
|
110 | | - |
111 | 116 | export const COMPOUND_EXTENSIONS: Record<string, string> = { |
112 | 117 | '.d.ts': 'typescript', |
113 | 118 | '.spec.js': 'javascript', |
@@ -150,10 +155,9 @@ export const COMPOUND_EXTENSIONS: Record<string, string> = { |
150 | 155 | 'vitest.config.json': 'json', |
151 | 156 | 'vitest.config.yaml': 'yaml', |
152 | 157 | 'vitest.config.yml': 'yaml', |
153 | | - 'vitest.config.toml': 'toml', |
| 158 | + 'vitest.config.toml': 'toml' |
154 | 159 | } |
155 | 160 |
|
156 | | - |
157 | 161 | export function getLangFromFileName(fileName: string): string { |
158 | 162 | if (!fileName) return 'text' |
159 | 163 | const lowerFileName = fileName.toLowerCase() |
|
0 commit comments