Skip to content

Commit 51f9b2e

Browse files
committed
feat: Add file type icons for Next.js, Spring Boot, Angular, Express.js, SQL, Docker, Kubernetes, AWS, and environment files
1 parent d378c1b commit 51f9b2e

File tree

1 file changed

+165
-0
lines changed

1 file changed

+165
-0
lines changed

index.js

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,171 @@
690690
cls: 'webpack-icon'
691691
};
692692
}
693+
// =============================
694+
// NEXT.JS
695+
// =============================
696+
if (
697+
fileName === 'next.config.js' ||
698+
fileName === 'next.config.ts' ||
699+
fileName === 'next-env.d.ts' ||
700+
fileName === 'middleware.js' ||
701+
fileName === 'middleware.ts' ||
702+
fileName === 'middleware.tsx' ||
703+
fileName === 'middleware.mjs' ||
704+
fileName === 'middleware.cjs'
705+
) {
706+
return {
707+
type: 'svg',
708+
url: 'public/nextjs.svg',
709+
color: '#000000',
710+
cls: 'nextjs-icon'
711+
};
712+
}
713+
// =============================
714+
// SPRING BOOT & ECOSYSTEM
715+
// =============================
716+
if (
717+
fileName === 'spring-boot-starter-parent.pom' ||
718+
fileName === 'spring.factories' ||
719+
fileName === 'application.properties' ||
720+
fileName === 'application.yml' ||
721+
fileName === 'application.yaml' ||
722+
fileName.endsWith('.spring')
723+
) {
724+
return {
725+
type: 'svg',
726+
url: 'public/springboot.svg',
727+
color: '#6db33f',
728+
cls: 'springboot-icon'
729+
};
730+
}
731+
// =============================
732+
// ANGULAR
733+
// =============================
734+
if (
735+
fileName === 'angular.json' ||
736+
fileName === 'angular-cli.json' ||
737+
fileName === 'main.ts' ||
738+
fileName === 'polyfills.ts' ||
739+
fileName === 'test.ts' ||
740+
fileName === 'tsconfig.app.json' ||
741+
fileName === 'tsconfig.spec.json' ||
742+
fileName === 'karma.conf.js' ||
743+
fileName === 'karma.conf.ts' ||
744+
fileName === 'protractor.conf.js' ||
745+
fileName === 'protractor.conf.ts'
746+
) {
747+
return {
748+
type: 'svg',
749+
url: 'public/angular.svg',
750+
color: '#dd0031',
751+
cls: 'angular-icon'
752+
};
753+
}
754+
// =============================
755+
// EXPRESS.JS
756+
// =============================
757+
if (
758+
fileName === 'app.js' ||
759+
fileName === 'app.ts' ||
760+
fileName === 'server.js' ||
761+
fileName === 'server.ts' ||
762+
fileName === 'express.js' ||
763+
fileName === 'express.ts'
764+
) {
765+
return {
766+
type: 'svg',
767+
url: 'public/express.svg',
768+
color: '#000000',
769+
cls: 'express-icon'
770+
};
771+
}
772+
// =============================
773+
// SQL
774+
// =============================
775+
if (
776+
fileName.endsWith('.sql') ||
777+
fileName.endsWith('.sqlite') ||
778+
fileName.endsWith('.sqlite3')
779+
) {
780+
return {
781+
type: 'svg',
782+
url: ICON_BASE_URL + 'database.svg',
783+
color: '#e38c00',
784+
cls: 'sql-icon'
785+
};
786+
}
787+
// =============================
788+
// DOCKER
789+
// =============================
790+
if (
791+
fileName === 'dockerfile' ||
792+
fileName.startsWith('dockerfile.') ||
793+
fileName === 'docker-compose.yml' ||
794+
fileName === 'docker-compose.yaml'
795+
) {
796+
return {
797+
type: 'svg',
798+
url: ICON_BASE_URL + 'docker.svg',
799+
color: '#0db7ed',
800+
cls: 'docker-icon'
801+
};
802+
}
803+
// =============================
804+
// KUBERNETES
805+
// =============================
806+
if (
807+
fileName === 'kubernetes.yaml' ||
808+
fileName === 'kubernetes.yml' ||
809+
fileName.endsWith('.k8s.yaml') ||
810+
fileName.endsWith('.k8s.yml') ||
811+
fileName === 'deployment.yaml' ||
812+
fileName === 'deployment.yml' ||
813+
fileName === 'service.yaml' ||
814+
fileName === 'service.yml' ||
815+
fileName === 'pod.yaml' ||
816+
fileName === 'pod.yml'
817+
) {
818+
return {
819+
type: 'svg',
820+
url: ICON_BASE_URL + 'kubernetes.svg',
821+
color: '#326ce5',
822+
cls: 'k8s-icon'
823+
};
824+
}
825+
// =============================
826+
// AWS
827+
// =============================
828+
if (
829+
fileName === 'aws.json' ||
830+
fileName === 'aws.yml' ||
831+
fileName === 'aws.yaml' ||
832+
fileName === 'cloudformation.yml' ||
833+
fileName === 'cloudformation.yaml' ||
834+
fileName === 'template.yml' ||
835+
fileName === 'template.yaml' ||
836+
fileName.endsWith('.aws.json') ||
837+
fileName.endsWith('.aws.yml') ||
838+
fileName.endsWith('.aws.yaml')
839+
) {
840+
return {
841+
type: 'svg',
842+
url: ICON_BASE_URL + 'aws.svg',
843+
color: '#ff9900',
844+
cls: 'aws-icon'
845+
};
846+
}
847+
// =============================
848+
// ENV FILES
849+
// =============================
850+
if (fileName.startsWith('.env')) {
851+
return {
852+
type: 'svg',
853+
url: ICON_BASE_URL + 'tune.svg',
854+
color: '#e7c547',
855+
cls: 'env-icon'
856+
};
857+
}
693858
if (fileName === 'vite.config.js' || fileName === 'vite.config.ts') {
694859
return {
695860
type: 'svg',

0 commit comments

Comments
 (0)