path-browserify
path-browserify copied to clipboard
Windows support
The separator is hard-coded as '/' but in reality, node also supports windows which has '' as default separator (see http://nodejs.org/api/path.html#path_path_sep ). This should be automatically detected and all fns that split things up depending upon the separator should should the os-proper separator.
I've been digging some more into this and come to the following conclusion:
- It's easy to add windows support. It's just a matter of getting the full path.js from the joyent/node -repo (dunno if it works in all browsers then but it seemed to work for me anyway)
- However, browserify's process dependency does not include the process.platform var, because it's just a plain js-file not processed.
- Thus, it doesn't work anyway because path.js wouldn't recognize the platform
Is it possible to get the process.platform to get set using some kind of preprocessing on the process lib used? Any help is greatly appreciated! If I get a few pointers I'll happily make PRs where appropriate to make everything work for both platforms (nix/windows).
See the reference for a workaround.
Windows support would be an enormous help for users trying to maintain cross-platform code. This is literally issue #1 - it would be so good to see support for this.
Oh whoops, just posted this: https://github.com/browserify/path-browserify/issues/31
The module is unusable for Windows users until this is resolved.