websemantics / file-icons-js

File specific icons for Javascript. A port of Atom File-icons (see https://github.com/file-icons/atom)
https://websemantics.github.io/file-icons-js/
MIT License
85 stars 15 forks source link

bugfix: ".txt" files #2

Closed billiegoose closed 7 years ago

billiegoose commented 7 years ago

For some reason .txt files weren't working. I think it's because this class just wasn't named correctly? Let me know what you think. Great library!

Alhadis commented 7 years ago

See here:

By default, icon names are suffixed with "-icon". Set noSuffix to true if you need to specify an icon class in its entirety (such as a default Atom icon). This should otherwise rarely be used.

Atom has a number of built-in icon-classes which the file-icons package also uses (although only a few icons are used this way). Search for noSuffix in the package's main config file for similar examples.

billiegoose commented 7 years ago

@Alhadis ok... does that impact the pull request? What should I change?

Alhadis commented 7 years ago

No change needed. It was just FYI.

websemantics commented 7 years ago

Thanks @wmhilton for your PR,

A similar issue with other file types confirms @Alhadis's feedback, many thanks for that!

I'll check if it's better to import Atom's built-in icons or renaming to existing ones are the way to go.

Alhadis commented 7 years ago

FYI, I intend to restructure a lot of the code you're currently using. File-icons v2.2 will bring some hefty changes to its infrastructure.

Just a heads up.

billiegoose commented 7 years ago

Awesome stuff. I really appreciate being able to use Atom's file-icons in the browser. Thanks guys!

tcosentino commented 7 years ago

FYI @wmhilton I added a PR with these changes and a fix for pdf #3

Thank you for this!