{"_id":"@daowei/my-icons","name":"@daowei/my-icons","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@daowei/my-icons","main":"lib/main.js","version":"1.1.0","description":"Assign file extension icons and colours for improved visual grepping","license":"MIT","engines":{"atom":">=1.25.0"},"publishConfig":{"access":"public"},"atomTestRunner":"atom-mocha","dependencies":{"atom-fs":"v0.2.1","lru-cache":"^5.1.1","mapped-disposable":"^1.0.3","micromatch":"^4.0.2"},"devDependencies":{"@alhadis/eslint-config":"^2.3.3","@babel/eslint-parser":"^7.15.0","atom-mocha":"^2.2.2","coffee-script":"^1.12.7","coffeelint":"^2.1.0","eslint":"^7.32.0","eslint-plugin-import":"^2.24.2","get-options":"^1.2.0","rimraf":"^3.0.2","tmp":"^0.1.0","unzipper":"^0.10.8"},"scripts":{"lint":"make lint","test":"make test"},"providedServices":{"file-icons.element-icons":{"versions":{"1.0.0":"provideService"}},"atom.file-icons":{"versions":{"1.0.0":"suppressFOUC"}}},"configSchema":{"coloured":{"type":"boolean","default":true,"description":"Untick this for colourless icons","order":1},"onChanges":{"type":"boolean","default":false,"title":"Only colour when changed","description":"Show different icon colours for modified files only. Requires that project be a Git repository.","order":2},"tabPaneIcon":{"type":"boolean","default":true,"title":"Show icons in file tabs","order":3},"defaultIconClass":{"type":"string","default":"default-icon","title":"Default icon class","description":"CSS class added to files that lack an icon.","order":4},"strategies":{"type":"object","title":"Match strategies","description":"Advanced settings for dynamic icon assignment.","order":5,"properties":{"grammar":{"type":"boolean","default":true,"order":1,"title":"Change on grammar override","description":"Change a file's icon when manually setting its language."},"hashbangs":{"type":"boolean","default":true,"order":2,"title":"Check hashbangs","description":"Allow lines like `#!/usr/bin/perl` to affect icons."},"modelines":{"type":"boolean","default":true,"order":3,"title":"Check modelines","description":"Allow [Vim](https://vim.fandom.com/wiki/Modeline_magic) and [Emacs](https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables) modelines to change icons."},"usertypes":{"type":"boolean","default":true,"order":4,"title":"Use custom file-types","description":"Respect the user's [custom language-type settings](http://flight-manual.atom.io/using-atom/sections/basic-customization/#customizing-language-recognition)."},"linguist":{"type":"boolean","default":true,"order":5,"title":"Use .gitattributes","description":"Honour [`linguist-language`](https://github.com/github/linguist/blob/master/docs/overrides.md#using-gitattributes) attributes in local `.gitattributes` files."}}}},"_id":"@daowei/my-icons@1.1.0","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-mujHkNMhcuehNpn/AMwFcdABlD7/77f47fatHMzZ+wnbkr2N3N5KsBwI4X/uphIPoVQc3ijHRn5W9/BJjTOJ+g==","shasum":"54f8a1b1dfecba19e927c65a0fbd5558a9c31ef3","tarball":"https://registry.npmjs.org/@daowei/my-icons/-/my-icons-1.1.0.tgz","fileCount":46,"unpackedSize":979362,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCsFtjbnJnsGzNOLqXBvLJYj0K6te16nSgFSXt07aYuywIhAKW8J+JWR2UxVekUrvBmLOrFZE//hV6WCFEAqWRwhHa9"}]},"_npmUser":{"name":"huadaowei","email":"81804883@qq.com"},"directories":{},"maintainers":[{"name":"huadaowei","email":"81804883@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/my-icons_1.1.0_1738808943511_0.8882685589045429"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-06T02:29:03.406Z","1.1.0":"2025-02-06T02:29:03.716Z","modified":"2025-02-06T02:29:04.031Z"},"maintainers":[{"name":"huadaowei","email":"81804883@qq.com"}],"description":"Assign file extension icons and colours for improved visual grepping","license":"MIT","readme":"File Icons\n==========\n\n[![Build status: TravisCI](https://img.shields.io/travis/file-icons/atom)](https://travis-ci.com/file-icons/atom)\n[![Latest package version](https://img.shields.io/apm/v/file-icons.svg?colorB=brightgreen)](https://github.com/file-icons/atom/releases/latest)\n\nFile-specific icons in Atom for improved visual grepping.\n\n<img alt=\"Icon previews\" width=\"850\" src=\"https://raw.githubusercontent.com/file-icons/atom/6714706f268e257100e03c9eb52819cb97ad570b/preview.png\" />\n\nSupports the following core packages:\n\n* [`tree-view`](https://atom.io/packages/tree-view)\n* [`tabs`](https://atom.io/packages/tabs)\n* [`fuzzy-finder`](https://atom.io/packages/fuzzy-finder)\n* [`find-and-replace`](https://atom.io/packages/find-and-replace)\n* [`archive-view`](https://atom.io/packages/archive-view)\n\nAn API is offered for packages not listed above. See the [integration steps][13] for more info.\n\n\nInstallation\n------------\nOpen **Settings** → **Install** and search for `file-icons`.\n\nAlternatively, install through command-line:\n\n\tapm install --production file-icons\n\n\nCustomisation\n-------------\nEverything is handled using CSS classes. Use your [stylesheet][1] to change or tweak icons.\n\nConsult the package stylesheets to see what classes are used:\n\n* **Icons:**   [`styles/icons.less`](./styles/icons.less)\n* **Colours:** [`styles/colours.less`](./styles/colours.less)\n* **Fonts:**   [`styles/fonts.less`](./styles/fonts.less)\n\n\n#### Icon reference\n* [**File-Icons**](https://github.com/file-icons/icons/blob/master/charmap.md) \n* [**FontAwesome 4.7.0**](https://fontawesome.com/v4.7.0/cheatsheet/)\n* [**Mfizz**](https://github.com/file-icons/MFixx/blob/master/charmap.md)\n* [**Devicons**](https://github.com/file-icons/DevOpicons/blob/master/charmap.md)\n\n\n### Examples ####################################################################\n\n#### Resize an icon\n~~~less\n.html5-icon:before{\n\tfont-size: 18px;\n}\n\n// Resize in tab-pane only:\n.tab > .html5-icon:before{\n\tfont-size: 18px;\n\ttop: 3px;\n}\n~~~\n\n\n#### Choose your own shades of orange\n~~~css\n.dark-orange   { color: #6a1e05; }\n.medium-orange { color: #b8743d; }\n.light-orange  { color: #cf9b67; }\n~~~\n\n\n#### Bring back PHP's blue-shield icon\n~~~css\n.php-icon:before{\n\tfont-family: MFizz;\n\tcontent: \"\\f147\";\n}\n~~~\n\n\n#### Assign icons by file extension\nThe following examples use [attribute selectors][12] to target specific pathnames:\n\n~~~css\n.icon[data-name$=\".js\"]:before{\n\tfont-family: Devicons;\n\tcontent: \"\\E64E\";\n}\n~~~\n\n\n#### Assign icons to directories\n~~~less\n.directory > .header > .icon{\n\t&[data-path$=\".atom/packages\"]:before{\n\t\tfont-family: \"Octicons Regular\";\n\t\tcontent: \"\\f0c4\";\n\t}\n}\n~~~\n\n\n\nTroubleshooting\n---------------\n\n<a name=\"error-after-installing\"></a>\n#### I see this error after installing:\n> _\"Cannot read property 'onDidChangeIcon' of undefined\"_\n\nA restart is needed to complete installation. Reload the window, or restart Atom.\n\nIf this doesn't help, [please file an issue][7].\n\n\n\n<a name=\"npm-error-when-installing\"></a>\n#### Installation halts with an `npm` error:\n> _npm ERR! cb() never called!_\n\nThere might be a corrupted download in your local cache.\nDelete `~/.atom/.apm`, then try again:\n\n~~~shell\nrm -rf ~/.atom/.apm\napm install --production file-icons\n~~~\n\n\n\n<a name=\"an-icon-has-stopped-updating\"></a>\n#### An icon has stopped updating:\nIt's probably a caching issue. Do the following:\n\n1. Open the command palette: <kbd>Cmd/Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>\n2. Run `file-icons:clear-cache`\n3. Reload the window, or restart Atom\n\n\n\n<a name=\"ruby-files-look-weird\"></a>\n#### Ruby files are showing the [wrong font][14]:\nIf [`language-ethereum`][15] is installed, remove it.\nThis is a [known issue][16] with the package, which is no longer maintained.\nFor Solidity support, use [`linter-solidity`][17] or [`language-solidity`][18] instead.\n\nIf `language-ethereum` *isn't* installed, please [follow these steps][19] and file an issue.\n\n\n\n<a name=\"the-tree-views-files-are-borked\"></a>\n#### The tree-view's files are borked and [look like this][6]:\nIf you haven't restarted Atom since upgrading to [File-Icons v2][v2.0], do so now.\n\nIf restarting doesn't help, your stylesheet probably needs updating. See below.\n\n\n\n<a name=\"my-stylesheet-has-errors-since-updating\"></a>\n#### My stylesheet has errors since updating:\nAs of [v2.0][], classes are used for displaying icons instead of mixins. Delete lines like these from your stylesheet:\n\n~~~diff\n-@import \"packages/file-icons/styles/icons\";\n-@import \"packages/file-icons/styles/items\";\n-@{pane-tab-selector},\n.icon-file-directory {\n\t&[data-name=\".git\"]:before {\n-\t\t.git-icon;\n+\t\tfont-family: Devicons;\n+\t\tcontent: \"\\E602\";\n\t}\n}\n~~~\n\n\nInstead of `@pane-tab…` variables, use `.tab > .icon[data-path]`:\n\n~~~diff\n-@pane-tab-selector,\n-@pane-tab-temp-selector,\n-@pane-tab-override {\n+.tab > .icon {\n \t&[data-path$=\".to.file\"] {\n \t\t\n \t}\n}\n~~~\n\n\nThese CSS classes are no longer used, so delete them:\n\n~~~diff\n-.file-icons-force-show-icons,\n-.file-icons-tab-pane-icon,\n-.file-icons-on-changes\n~~~\n\n\n#### It's something else.\nPlease [file an issue][7]. Include screenshots if necessary.\n\n\n\nIntegration with other packages\n-----------------------------------------------------------------------------------\nIf you're a package author, you can integrate File-Icons using Atom's services API.\n\nFirst, add this to your `package.json` file:\n\n```json\n\"consumedServices\": {\n\t\"file-icons.element-icons\": {\n\t\t\"versions\": {\n\t\t\t\"1.0.0\": \"consumeElementIcons\"\n\t\t}\n\t}\n}\n```\n\nSecondly, add a function named `consumeElementIcons` (or whatever you named it) to your package's main export:\n\n```js\nlet addIconToElement;\nmodule.exports.consumeElementIcons = function(func){\n\taddIconToElement = func;\n};\n```\n\nThen call the function it gets passed to display icons in the DOM:\n\n```js\nlet fileIcon = document.querySelector(\"li.file-entry > span.icon\");\naddIconToElement(fileIcon, \"/path/to/file.txt\");\n```\n\nThe returned value is a [`Disposable`][10] which clears the icon from memory once it's no longer needed:\n\n```js\nconst disposable = addIconToElement(fileIcon, \"/path/to/file.txt\");\nfileIcon.onDestroy(() => disposable.dispose());\n```\n\n**NOTE:** Remember to remove any default icon-classes *before* calling the service handler!\n\n```diff\n let fileIcon = document.querySelector(\"li.file-entry > span.icon\");\n+fileIcon.classList.remove(\"icon-file-text\");\n const disposable = addIconToElement(fileIcon, \"/path/to/file.txt\");\n```\n\n\nSponsors\n------------------------------------------------------------------------------------------\nHuge thanks to the following backers who generously sponsored this project in the past:\n\n<a title=\"Justin Ireland\" href=\"https://github.com/justinireland\"><img alt=\"Justin Ireland\" height=\"32\" src=\"https://images.opencollective.com/proxy/images?src=https%3A%2F%2Fwww.gravatar.com%2Favatar%2Fa23264984bdeee03b97d970cd893a595%3Fdefault%3D404\"/></a>\n<a title=\"Tipe\" href=\"https://tipe.io/\"><img alt=\"Tipe\" height=\"32\" src=\"https://camo.githubusercontent.com/cc8c116a0174ba6f6884fda5415ccd232173d0c7/68747470733a2f2f63646e2e746970652e696f2f746970652f746970652d3130323478313032342e706e67\"/></a>\n<a title=\"Triplebyte\" href=\"https://github.com/triplebyte\"><img alt=\"Triplebyte\" height=\"32\" src=\"https://avatars3.githubusercontent.com/u/12144133\"/></a>\n<a title=\"TakeShape\" href=\"https://github.com/takeshape\"><img alt=\"TakeShape\" height=\"32\" src=\"https://avatars0.githubusercontent.com/u/20775272\"/></a>\n<a title=\"Targeted Web Traffic\" href=\"https://www.targetedwebtraffic.com/\"><img alt=\"Targeted Web Traffic\" height=\"32\" src=\"https://images.opencollective.com/targeted-web-traffic1/7abacc7/logo/256.png\"/></a>\n\n\nAcknowledgements\n------------------------------------------------------------------------------------------\n`v1` was originally based on [sommerper/filetype-color][8]. `v2` was completely rewritten.\nBoth versions owe their success to innumerable [contributions][9] from the Atom community.\n\n\n[Referenced links]: ____________________________________________________\n[1]: https://flight-manual.atom.io/using-atom/sections/basic-customization/#style-tweaks\n[4]: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors\n[5]: https://github.com/file-icons/DevOpicons/blob/master/charmap.md#JavaScript\n[6]: https://cloud.githubusercontent.com/assets/714197/21516010/4b79a8a8-cd39-11e6-8394-1e3ab778af92.png\n[7]: https://github.com/file-icons/atom/issues/new\n[8]: https://github.com/sommerper/filetype-color\n[9]: https://github.com/file-icons/atom/graphs/contributors\n[10]: https://atom.io/docs/api/latest/Disposable\n[11]: https://github.com/Alhadis\n[12]: https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors\n[13]: https://github.com/file-icons/atom#integration-with-other-packages\n[14]: https://user-images.githubusercontent.com/4875955/40267919-1829d17e-5b65-11e8-9ea4-974a6bd79c37.png\n[15]: https://atom.io/packages/language-ethereum\n[16]: https://github.com/caktux/language-ethereum/pull/13\n[17]: https://atom.io/packages/linter-solidity\n[18]: https://atom.io/packages/language-solidity\n[19]: https://github.com/file-icons/atom/issues/708#issuecomment-366959765\n[v2.0]: https://github.com/file-icons/atom/releases/tag/v2.0.0\n","readmeFilename":"README.md"}