Commit caea5ca4 authored by Marcel van Remmerden's avatar Marcel van Remmerden Committed by Phil Hughes

Fix display of icons for files with two extensions

parent e5dd7a3c
...@@ -6,15 +6,10 @@ const fileExtensionIcons = { ...@@ -6,15 +6,10 @@ const fileExtensionIcons = {
jade: 'pug', jade: 'pug',
pug: 'pug', pug: 'pug',
md: 'markdown', md: 'markdown',
'md.rendered': 'markdown',
markdown: 'markdown', markdown: 'markdown',
'markdown.rendered': 'markdown',
mdown: 'markdown', mdown: 'markdown',
'mdown.rendered': 'markdown',
mkd: 'markdown', mkd: 'markdown',
'mkd.rendered': 'markdown',
mkdn: 'markdown', mkdn: 'markdown',
'mkdn.rendered': 'markdown',
rst: 'markdown', rst: 'markdown',
blink: 'blink', blink: 'blink',
css: 'css', css: 'css',
...@@ -23,7 +18,6 @@ const fileExtensionIcons = { ...@@ -23,7 +18,6 @@ const fileExtensionIcons = {
less: 'less', less: 'less',
json: 'json', json: 'json',
yaml: 'yaml', yaml: 'yaml',
'YAML-tmLanguage': 'yaml',
yml: 'yaml', yml: 'yaml',
xml: 'xml', xml: 'xml',
plist: 'xml', plist: 'xml',
...@@ -85,10 +79,7 @@ const fileExtensionIcons = { ...@@ -85,10 +79,7 @@ const fileExtensionIcons = {
props: 'settings', props: 'settings',
toml: 'settings', toml: 'settings',
prefs: 'settings', prefs: 'settings',
'sln.dotsettings': 'settings',
'sln.dotsettings.user': 'settings',
ts: 'typescript', ts: 'typescript',
'd.ts': 'typescript-def',
marko: 'markojs', marko: 'markojs',
pdf: 'pdf', pdf: 'pdf',
xlsx: 'table', xlsx: 'table',
...@@ -99,7 +90,6 @@ const fileExtensionIcons = { ...@@ -99,7 +90,6 @@ const fileExtensionIcons = {
vscodeignore: 'vscode', vscodeignore: 'vscode',
vsixmanifest: 'vscode', vsixmanifest: 'vscode',
vsix: 'vscode', vsix: 'vscode',
'code-workplace': 'vscode',
suo: 'visualstudio', suo: 'visualstudio',
sln: 'visualstudio', sln: 'visualstudio',
csproj: 'visualstudio', csproj: 'visualstudio',
...@@ -118,7 +108,6 @@ const fileExtensionIcons = { ...@@ -118,7 +108,6 @@ const fileExtensionIcons = {
xz: 'zip', xz: 'zip',
bzip2: 'zip', bzip2: 'zip',
gzip: 'zip', gzip: 'zip',
'7z': 'zip',
rar: 'zip', rar: 'zip',
tgz: 'zip', tgz: 'zip',
exe: 'exe', exe: 'exe',
...@@ -129,7 +118,6 @@ const fileExtensionIcons = { ...@@ -129,7 +118,6 @@ const fileExtensionIcons = {
c: 'c', c: 'c',
m: 'c', m: 'c',
h: 'h', h: 'h',
'c++': 'cpp',
cc: 'cpp', cc: 'cpp',
cpp: 'cpp', cpp: 'cpp',
mm: 'cpp', mm: 'cpp',
...@@ -231,7 +219,6 @@ const fileExtensionIcons = { ...@@ -231,7 +219,6 @@ const fileExtensionIcons = {
m2v: 'movie', m2v: 'movie',
vdi: 'virtual', vdi: 'virtual',
vbox: 'virtual', vbox: 'virtual',
'vbox-prev': 'virtual',
ics: 'email', ics: 'email',
mp3: 'music', mp3: 'music',
flac: 'music', flac: 'music',
...@@ -277,44 +264,12 @@ const fileExtensionIcons = { ...@@ -277,44 +264,12 @@ const fileExtensionIcons = {
ml: 'ocaml', ml: 'ocaml',
mli: 'ocaml', mli: 'ocaml',
cmx: 'ocaml', cmx: 'ocaml',
'js.map': 'javascript-map',
'css.map': 'css-map',
lock: 'lock', lock: 'lock',
hbs: 'handlebars', hbs: 'handlebars',
mustache: 'handlebars', mustache: 'handlebars',
pl: 'perl', pl: 'perl',
pm: 'perl', pm: 'perl',
hx: 'haxe', hx: 'haxe',
'spec.ts': 'test-ts',
'test.ts': 'test-ts',
'ts.snap': 'test-ts',
'spec.tsx': 'test-jsx',
'test.tsx': 'test-jsx',
'tsx.snap': 'test-jsx',
'spec.jsx': 'test-jsx',
'test.jsx': 'test-jsx',
'jsx.snap': 'test-jsx',
'spec.js': 'test-js',
'test.js': 'test-js',
'js.snap': 'test-js',
'routing.ts': 'angular-routing',
'routing.js': 'angular-routing',
'module.ts': 'angular',
'module.js': 'angular',
'ng-template': 'angular',
'component.ts': 'angular-component',
'component.js': 'angular-component',
'guard.ts': 'angular-guard',
'guard.js': 'angular-guard',
'service.ts': 'angular-service',
'service.js': 'angular-service',
'pipe.ts': 'angular-pipe',
'pipe.js': 'angular-pipe',
'filter.js': 'angular-pipe',
'directive.ts': 'angular-directive',
'directive.js': 'angular-directive',
'resolver.ts': 'angular-resolver',
'resolver.js': 'angular-resolver',
pp: 'puppet', pp: 'puppet',
ex: 'elixir', ex: 'elixir',
exs: 'elixir', exs: 'elixir',
...@@ -345,11 +300,8 @@ const fileExtensionIcons = { ...@@ -345,11 +300,8 @@ const fileExtensionIcons = {
haml: 'haml', haml: 'haml',
yang: 'yang', yang: 'yang',
tf: 'terraform', tf: 'terraform',
'tf.json': 'terraform',
tfvars: 'terraform', tfvars: 'terraform',
tfstate: 'terraform', tfstate: 'terraform',
'blade.php': 'laravel',
'inky.php': 'laravel',
applescript: 'applescript', applescript: 'applescript',
cake: 'cake', cake: 'cake',
feature: 'cucumber', feature: 'cucumber',
...@@ -376,13 +328,7 @@ const fileExtensionIcons = { ...@@ -376,13 +328,7 @@ const fileExtensionIcons = {
kv: 'kivy', kv: 'kivy',
graphcool: 'graphcool', graphcool: 'graphcool',
sbt: 'sbt', sbt: 'sbt',
'reducer.ts': 'ngrx-reducer',
'rootReducer.ts': 'ngrx-reducer',
'state.ts': 'ngrx-state',
'actions.ts': 'ngrx-actions',
'effects.ts': 'ngrx-effects',
cr: 'crystal', cr: 'crystal',
'drone.yml': 'drone',
cu: 'cuda', cu: 'cuda',
cuh: 'cuda', cuh: 'cuda',
log: 'log', log: 'log',
...@@ -390,6 +336,60 @@ const fileExtensionIcons = { ...@@ -390,6 +336,60 @@ const fileExtensionIcons = {
const twoFileExtensionIcons = { const twoFileExtensionIcons = {
'gradle.kts': 'gradle', 'gradle.kts': 'gradle',
'md.rendered': 'markdown',
'markdown.rendered': 'markdown',
'mdown.rendered': 'markdown',
'mkd.rendered': 'markdown',
'mkdn.rendered': 'markdown',
'YAML-tmLanguage': 'yaml',
'sln.dotsettings': 'settings',
'sln.dotsettings.user': 'settings',
'd.ts': 'typescript-def',
'code-workplace': 'vscode',
'7z': 'zip',
'c++': 'cpp',
'vbox-prev': 'virtual',
'js.map': 'javascript-map',
'css.map': 'css-map',
'spec.ts': 'test-ts',
'test.ts': 'test-ts',
'ts.snap': 'test-ts',
'spec.tsx': 'test-jsx',
'test.tsx': 'test-jsx',
'tsx.snap': 'test-jsx',
'spec.jsx': 'test-jsx',
'test.jsx': 'test-jsx',
'jsx.snap': 'test-jsx',
'spec.js': 'test-js',
'test.js': 'test-js',
'js.snap': 'test-js',
'routing.ts': 'angular-routing',
'routing.js': 'angular-routing',
'module.ts': 'angular',
'module.js': 'angular',
'ng-template': 'angular',
'component.ts': 'angular-component',
'component.js': 'angular-component',
'guard.ts': 'angular-guard',
'guard.js': 'angular-guard',
'service.ts': 'angular-service',
'service.js': 'angular-service',
'pipe.ts': 'angular-pipe',
'pipe.js': 'angular-pipe',
'filter.js': 'angular-pipe',
'directive.ts': 'angular-directive',
'directive.js': 'angular-directive',
'resolver.ts': 'angular-resolver',
'resolver.js': 'angular-resolver',
'tf.json': 'terraform',
'blade.php': 'laravel',
'inky.php': 'laravel',
'reducer.ts': 'ngrx-reducer',
'rootReducer.ts': 'ngrx-reducer',
'state.ts': 'ngrx-state',
'actions.ts': 'ngrx-actions',
'effects.ts': 'ngrx-effects',
'drone.yml': 'drone',
}; };
const fileNameIcons = { const fileNameIcons = {
......
...@@ -34,7 +34,7 @@ describe('File Icon component', () => { ...@@ -34,7 +34,7 @@ describe('File Icon component', () => {
it.each` it.each`
fileName | iconName fileName | iconName
${'test.js'} | ${'javascript'} ${'index.js'} | ${'javascript'}
${'test.png'} | ${'image'} ${'test.png'} | ${'image'}
${'test.PNG'} | ${'image'} ${'test.PNG'} | ${'image'}
${'.npmrc'} | ${'npm'} ${'.npmrc'} | ${'npm'}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment