-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some more Windows paths issues #63
Conversation
- for Windows compability, replace '\' with '/' - make tests to pass in Windows (use path.join for filenames)
It looks like you're normalizing
Awesome! Windows CI would be amazing. Does @substack or someone need to make an Appveyor account and enable the GitHub hook? |
I remember writing reply but apparently it´s lost.
When looking at it, the correct way to fix it would be to remove leading slash. Then the path would be what it pretends to be: relative path from project root. But doing so might break many projects. Another option would be to remove leading slash on Windows only. That would work. In context of Browserify, normalizing to *nix format makes sense: runtime environment is "browser", not Windows or *nix. Also, path-browserify works only with
Sign-in using GH account, click new project and pick repo from the list. |
Thanks -- that makes sense. I'm 👍 for this, but don't have easy access to a Windows machine to test or enough context to feel comfortable merging it in. Will leave for another collaborator. |
Windows users may also be interested in a different path issue (related to source maps) in #68 |
Just enabled appveyor; this seems to work ok, thanks! Hopefully it's still useful for you even 2½ years later :) |
When using
__filename
in Browserify, I was getting mixed path separators, like/stores\MyStore.js
.When searching issues and PRs, I found that similar issue is fixed earlier. So I thought I´d apply same fix to
__filename
and__dirname
too. But before doing anything, I rannpm test
and learnt it doesnt pass in Windows. So I had to fix couple of tests too, by usingpath.join
, to get it work.Also, currently, PR includes
appveyor.yml
equivalent of your Travis config. Considering there have been quite many Windows related issues lately, it might be good idea to start using Windows based CI too.