nadav-dav / rekuire

'rekuire' is basically node's 'require' without the relative paths
93 stars 10 forks source link

Linux/Windows path agnostic #7

Closed ardoyle closed 10 years ago

ardoyle commented 10 years ago

Can you modify the scanner to replace all windows style backslash with linux style forward slash?

Example of change in scan.js:

var base = path.basename(file,ext).replace(/\\/g, "/");
var relative = path.relative(baseDir,dir).replace(/\\/g, "/");

I don't usually work on windows but have a loaner laptop and when trying to access a library via parent/child/child.js it cannot be found because scanner stored this as parent\child/child.js.

nadav-dav commented 10 years ago

can you do me a favor (since i don't have a windows machine available.. ) please surround this two path with path.normalize(...) and run your tests. this should solve the OS difference in path formatting. :)

nadav-dav commented 10 years ago

closed due to inability to reproduce