I have a problem with different paths to files on Mac and Windows. The file path is correct on Mac, wrong on windows.
My package is called emoji-syntax. What I do is, dynamically creating a stylesheet and adding this to
atom.stylesElement to display emoji next to language selectors like
.source.js .meta.import .keyword:first-child:before. It feels a bit wrong though, but it works for me.
Now what I am doing is, I want to have custom emoji sets and replace the unicode with an SVG. This works all fine on Mac, but not on Windows where the path to the file is wrong.
To get the path I use
atom.packages.resolvePackagePath('emoji-syntax') and then reference to the file in my CSS. I get the correct link on Windows too, but somehow it’s doubled.
The two paths look like this:
This is a little bit confusing to me and I hope I could explain my problem exactly. Basically, what I want to know: How do I get the correct path to a file in my package on Windows and Mac?