es6-transpiler icon indicating copy to clipboard operation
es6-transpiler copied to clipboard

CLI app doesn't work in Windows

Open kobezzza opened this issue 10 years ago • 6 comments

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

kobezzza avatar Sep 11 '14 10:09 kobezzza

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.

raiden-dev avatar Sep 11 '14 12:09 raiden-dev

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

kobezzza avatar Sep 11 '14 13:09 kobezzza

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?

raiden-dev avatar Sep 11 '14 13:09 raiden-dev

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.

kobezzza avatar Sep 11 '14 13:09 kobezzza

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.

raiden-dev avatar Sep 11 '14 14:09 raiden-dev

@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.

termi avatar Sep 12 '14 15:09 termi