termi / es6-transpiler

Tomorrow's JavaScript syntax today
Other
216 stars 18 forks source link

CLI app doesn't work in Windows #48

Open kobezzza opened 10 years ago

kobezzza commented 10 years ago

es6-transpiler.cmd

@IF EXIST "%~dp0\/bin/sh.exe" (
  "%~dp0\/bin/sh.exe"  "%~dp0\node_modules\es6-transpiler\build\es5\es6toes5" %*
) ELSE (
  /bin/sh  "%~dp0\node_modules\es6-transpiler\build\es5\es6toes5" %*
)

After fix

@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe" --harmony "%~dp0\..\es6-transpiler\build\es5\es6toes5.js" %*
) ELSE (
  node --harmony "%~dp0\..\es6-transpiler\build\es5\es6toes5.js" %*
)

all works fine

raiden-dev commented 10 years ago

The CLI script in the transpiler project assumes that you have a POSIX environment. Windows does not comply this standards by default. Write the wrapper by yourself or try to use the Cygwin environment or something similar.

kobezzza commented 10 years ago

Why? In previous version es6-transpiler all works fine.

raiden-dev commented 10 years ago

Could you please point me to the working on WIndows version of transpiler's CLI script? Where did you get es6-transpiler.cmd? You have /bin/sh in your system? What environment do you use?

kobezzza commented 10 years ago

v0.7.16 all fine, node_modules/.bin/es6-transpiler.cmd

@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\..\es6-transpiler\build\es5\es6toes5" %*
) ELSE (
  node  "%~dp0\..\es6-transpiler\build\es5\es6toes5" %*
)

v0.7.16-2 error, node_modules/.bin/es6-transpiler.cmd

@IF EXIST "%~dp0\/bin/sh.exe" (
  "%~dp0\/bin/sh.exe"  "%~dp0\node_modules\es6-transpiler\build\es5\es6toes5" %*
) ELSE (
  /bin/sh  "%~dp0\node_modules\es6-transpiler\build\es5\es6toes5" %*
)

You have /bin/sh in your system? No.

What environment do you use? Windows 7, WebStorm FileWatcher.

raiden-dev commented 10 years ago

OK, I'll get it, thanks! It's some of npm's generated stuff. Will think how to fix this without breaking unix systems support.

termi commented 10 years ago

@raiden-dev I would be very grateful if you can fix this behavior. Personally I am using a Cygwin on Windows so I don't have such problem.