-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on Hash-Bang #49
Comments
Scripts starting with shebang should be invoked directly from shell, not through node.js. |
Scripts starting with shebang should be invoked directly from shell, not through node.js. Yes, but here is something else: the code is not transpiled - es6-transpiler error. console.es6 #!/usr/bin/env node
/* my console app */ |
Why it should be transpiled? It is not a valid JS at all. Transpiler gives a proper error, cause you can not do tricks like this. Transpile your script first and then use transpiled output to make a shell script with a shebang. |
This could be done optionally, for example //#!/usr/bin/env node
/* my CLI app */ es6-transpiler myApp.es6 --sha-bang > myApp.js -> #!/usr/bin/env node
/* my CLI app */ Why not? It is more convenient than writing wrapper. |
Such things have no relation to JavaScript. You not blames browsers that throws an exception for invalid code and you can't blame transpiler for the same reasons. You should write the wrapper cause it is out of transpiler's responsibility zone. |
Error:
The text was updated successfully, but these errors were encountered: