{"id":31225909,"url":"https://github.com/electerm/electerm-icons","last_synced_at":"2025-09-22T01:59:33.446Z","repository":{"id":315557603,"uuid":"1059975654","full_name":"electerm/electerm-icons","owner":"electerm","description":"A lightweight TypeScript library providing essential file type icons, similar to vscode-icons but with a curated set of the most commonly used icons.","archived":false,"fork":false,"pushed_at":"2025-09-19T08:12:02.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T10:28:45.094Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electerm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-19T07:59:46.000Z","updated_at":"2025-09-19T08:12:05.000Z","dependencies_parsed_at":"2025-09-19T10:39:00.898Z","dependency_job_id":null,"html_url":"https://github.com/electerm/electerm-icons","commit_stats":null,"previous_names":["electerm/electerm-icons"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/electerm/electerm-icons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Felecterm-icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Felecterm-icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Felecterm-icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Felecterm-icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electerm","download_url":"https://codeload.github.com/electerm/electerm-icons/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electerm%2Felecterm-icons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276186947,"owners_count":25599800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-22T01:59:32.809Z","updated_at":"2025-09-22T01:59:33.432Z","avatar_url":"https://github.com/electerm.png","language":"TypeScript","readme":"# electerm-icons\n\nA lightweight TypeScript library providing essential file type icons, similar to vscode-icons but with a curated set of the most commonly used icons.\n\n## Features\n\n- 🎯 **Essential Icons Only**: Curated set of 48 most commonly used file type icons\n- 📦 **Lightweight**: Reduced from 1400+ to 48 icons (96.6% size reduction)\n- 🔧 **TypeScript**: Full TypeScript support with type definitions\n- 🌐 **ES Modules**: Modern ES module support only\n- 📁 **Complete API**: Same interface as vscode-icons for easy migration\n\n## Installation\n\n```bash\nnpm install electerm-icons\n```\n\n## Usage\n\n```typescript\nimport { \n  getIconForFile,\n  getIconForFolder\n} from 'electerm-icons';\n\n// Get icon for files\nconsole.log(getIconForFile('index.html'));      // 'file_type_html.svg'\nconsole.log(getIconForFile('script.js'));       // 'file_type_js.svg'\nconsole.log(getIconForFile('main.py'));         // 'file_type_python.svg'\nconsole.log(getIconForFile('unknown.xyz'));     // 'default_file.svg'\n\n// Get icon for folders\nconsole.log(getIconForFolder('src'));           // 'default_folder.svg'\n```\n\n## Supported File Types\n\n### Web Development\n- HTML: `.html`, `.htm`, `.xhtml`\n- CSS: `.css`, `.scss`, `.sass`, `.less`\n- JavaScript: `.js`, `.mjs`, `.cjs`\n- TypeScript: `.ts`, `.tsx`\n- JSON: `.json`, `.jsonc`\n- XML: `.xml`, `.xsd`, `.xsl`\n\n### Programming Languages\n- Python: `.py`, `.pyw`, `.pyc`, `.pyo`\n- Java: `.java`, `.class`, `.jar`\n- C/C++: `.c`, `.h`, `.cpp`, `.cxx`, `.cc`, `.hpp`, `.hxx`\n- C#: `.cs`, `.csx`\n- PHP: `.php`, `.phtml`, `.php3`, `.php4`, `.php5`\n- Go: `.go`\n- Rust: `.rs`, `.rlib`\n- Ruby: `.rb`, `.erb`, `.gemspec`\n- Swift: `.swift`\n- Kotlin: `.kt`, `.kts`\n\n### Data \u0026 Configuration\n- YAML: `.yaml`, `.yml`\n- TOML: `.toml`\n- INI: `.ini`, `.cfg`, `.conf`\n- SQL: `.sql`, `.mysql`, `.pgsql`\n\n### Documentation\n- Markdown: `.md`, `.markdown`, `.mdown`\n\n### Special Files\n- `package.json`, `package-lock.json`\n- `.gitignore`, `.gitattributes`\n- `Dockerfile`, `docker-compose.yml`\n- `CMakeLists.txt`, `Makefile`\n- `LICENSE`, `README.md`\n\n## API Reference\n\n### Functions\n\n#### `getIconForFile(fileName: string): string`\nReturns the appropriate icon filename for a given file.\n\n#### `getIconForFolder(folderName: string): string`\nReturns the appropriate icon filename for a folder.\n\n### Constants\n\n- `DEFAULT_FILE`: Default file icon\n- `DEFAULT_FOLDER`: Default folder icon\n\n## Size Comparison\n\n| Library | Icons | Size | Use Case |\n|---------|-------|------|----------|\n| vscode-icons | 1400+ | 7.7MB | Full IDE support |\n| electerm-icons | 48 | ~0.14MB | Essential files only |\n\n## Migration from vscode-icons\n\nelecterm-icons provides the same API as vscode-icons, making migration simple:\n\n```typescript\n// Before (vscode-icons)\nimport { getIconForFile } from 'vscode-icons-js';\n\n// After (electerm-icons)\nimport { getIconForFile } from 'electerm-icons';\n\n// Same function calls work identically\nconst icon = getIconForFile('index.html');\n```\n\n## Development\n\n```bash\n\n# Build the library\nnpm run build\n\n# Run tests\nnpm test\n\n# Development with watch mode\nnpm run dev\n```\n\n## License\n\nMIT © ZHAO Xudong\n\n## Credits\n\nAll icons in this project are sourced from [vscode-icons](https://github.com/vscode-icons/vscode-icons), licensed under the [MIT License](https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE).\n\n```\nCopyright (c) 2016-present Roberto Huertas\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felecterm%2Felecterm-icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felecterm%2Felecterm-icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felecterm%2Felecterm-icons/lists"}