Closed raiden-dev closed 10 years ago
By the way, maybe we should move the executables es6toes5 and es6toes5.js to new bin/
directory?
By the way, maybe we should move the executables es6toes5 and es6toes5.js to new bin/ directory? I will do it. Thx for the PR
Hello,
I've been having troubles calling your node_modules/bin
executable from npm
.
Your bash is written to be used inside the /build/es5
directory, but when called via npm
scripts, the directory from which it is executed is node_modules/bin
and so it fails since there is no es6-transpiler.js
file there.
I have it working by simple putting this inside the executable:
#!/bin/sh
exec node --harmony "node_modules/$(basename $0)/es6toes5.js" "$@"
Which works because I'm calling it next to the node_modules
directory.
That said, I don't know how the file is supposed to work when the module is installed globally or in any other scenarios… (although I remember having similar issues in the global install and having to symlink manually the desired file)
Is this working for everyone except me? I'm running on macOS 10.9.5 thanks!
Shebang with
/usr/bin/env
cannot receive arguments. So,#!/usr/bin/env node --harmony
will fail on different systems, such as linux. See http://stackoverflow.com/a/4304187/1913708Also,
chmod +x
was done for build scripts.