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 = {
jade: 'pug',
pug: 'pug',
md: 'markdown',
'md.rendered': 'markdown',
markdown: 'markdown',
'markdown.rendered': 'markdown',
mdown: 'markdown',
'mdown.rendered': 'markdown',
mkd: 'markdown',
'mkd.rendered': 'markdown',
mkdn: 'markdown',
'mkdn.rendered': 'markdown',
rst: 'markdown',
blink: 'blink',
css: 'css',
......@@ -23,7 +18,6 @@ const fileExtensionIcons = {
less: 'less',
json: 'json',
yaml: 'yaml',
'YAML-tmLanguage': 'yaml',
yml: 'yaml',
xml: 'xml',
plist: 'xml',
......@@ -85,10 +79,7 @@ const fileExtensionIcons = {
props: 'settings',
toml: 'settings',
prefs: 'settings',
'sln.dotsettings': 'settings',
'sln.dotsettings.user': 'settings',
ts: 'typescript',
'd.ts': 'typescript-def',
marko: 'markojs',
pdf: 'pdf',
xlsx: 'table',
......@@ -99,7 +90,6 @@ const fileExtensionIcons = {
vscodeignore: 'vscode',
vsixmanifest: 'vscode',
vsix: 'vscode',
'code-workplace': 'vscode',
suo: 'visualstudio',
sln: 'visualstudio',
csproj: 'visualstudio',
......@@ -118,7 +108,6 @@ const fileExtensionIcons = {
xz: 'zip',
bzip2: 'zip',
gzip: 'zip',
'7z': 'zip',
rar: 'zip',
tgz: 'zip',
exe: 'exe',
......@@ -129,7 +118,6 @@ const fileExtensionIcons = {
c: 'c',
m: 'c',
h: 'h',
'c++': 'cpp',
cc: 'cpp',
cpp: 'cpp',
mm: 'cpp',
......@@ -231,7 +219,6 @@ const fileExtensionIcons = {
m2v: 'movie',
vdi: 'virtual',
vbox: 'virtual',
'vbox-prev': 'virtual',
ics: 'email',
mp3: 'music',
flac: 'music',
......@@ -277,44 +264,12 @@ const fileExtensionIcons = {
ml: 'ocaml',
mli: 'ocaml',
cmx: 'ocaml',
'js.map': 'javascript-map',
'css.map': 'css-map',
lock: 'lock',
hbs: 'handlebars',
mustache: 'handlebars',
pl: 'perl',
pm: 'perl',
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',
ex: 'elixir',
exs: 'elixir',
......@@ -345,11 +300,8 @@ const fileExtensionIcons = {
haml: 'haml',
yang: 'yang',
tf: 'terraform',
'tf.json': 'terraform',
tfvars: 'terraform',
tfstate: 'terraform',
'blade.php': 'laravel',
'inky.php': 'laravel',
applescript: 'applescript',
cake: 'cake',
feature: 'cucumber',
......@@ -376,13 +328,7 @@ const fileExtensionIcons = {
kv: 'kivy',
graphcool: 'graphcool',
sbt: 'sbt',
'reducer.ts': 'ngrx-reducer',
'rootReducer.ts': 'ngrx-reducer',
'state.ts': 'ngrx-state',
'actions.ts': 'ngrx-actions',
'effects.ts': 'ngrx-effects',
cr: 'crystal',
'drone.yml': 'drone',
cu: 'cuda',
cuh: 'cuda',
log: 'log',
......@@ -390,6 +336,60 @@ const fileExtensionIcons = {
const twoFileExtensionIcons = {
'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 = {
......
......@@ -34,7 +34,7 @@ describe('File Icon component', () => {
it.each`
fileName | iconName
${'test.js'} | ${'javascript'}
${'index.js'} | ${'javascript'}
${'test.png'} | ${'image'}
${'test.PNG'} | ${'image'}
${'.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