pichsenmeister / WienerScript

MIT License
601 stars 10 forks source link

Wrong path on Windows CMD #3

Closed Bl00drav3n closed 4 years ago

Bl00drav3n commented 4 years ago

In Windows CMD, I get a wrong path string, because the the filepath is encoded with forward slashes, but the currentPath is encoded with backslashes.

Easy fix that worked for me, in index.js:40: const filePath = path.join(currentPath, 'dist', path.normalize(file).replace(currentPath, '').replace('.ws', '.js')) where I explicitly normalized the file path.

pichsenmeister commented 4 years ago

added a fix and published version 1.0.2