https://github.com/marktext/file-icons
atom file icons
https://github.com/marktext/file-icons
Last synced: 9 months ago
JSON representation
atom file icons
- Host: GitHub
- URL: https://github.com/marktext/file-icons
- Owner: marktext
- License: mit
- Created: 2021-12-19T00:59:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-02T14:04:53.000Z (over 4 years ago)
- Last Synced: 2025-07-02T09:41:40.815Z (10 months ago)
- Language: JavaScript
- Size: 218 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# File Icons
File icons used in **MarkText** and inspired by [file-icons/atom](https://github.com/file-icons/atom/tree/master).

#### Installation
```shell
yarn add @marktext/file-icons
```
#### Usage
```javascript
import fileIcons from '@marktext/file-icons'
import '@marktext/file-icons/build/index.css'
const icon = fileIcons.matchLanguage('javascript')
// iconEle.classList.add(icon.icon)
// icon with color
// iconEle.classList.add(icon.colour[0])
// iconEle.classList.add(icon.colour[1])
```
You can refer more APIs at [atom/icon-tables.js at master · file-icons/atom · GitHub](https://github.com/file-icons/atom/blob/master/lib/icons/icon-tables.js)
#### Development
```shell
yarn dev
```
And open browser at `http://127.0.0.1:3000/` to see the example. the example is at folder `src`.
#### Build and Publish
```shell
# Change the version in package.json
# Build to the build folder
yarn build
# Publish to npm
yarn pub
```
#### License
MIT.