Created
September 13, 2016 19:04
-
-
Save hildjj/9d0ff5a1c3638656fbcfb0e09c3df72e to your computer and use it in GitHub Desktop.
Make coffeescript that has been compiled to javascript run as shebang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env coffee | |
`#!/usr/bin/env node | |
` | |
# The extra newline in the backticks is crucial. | |
# It keeps the semicolon that coffee-script adds from messing up the shebang. | |
# now compile with "coffee -bcs --no-header < foo.coffee > bin/foo" | |
# -b: bare | |
# -c: compile | |
# -s: stdio | |
# --noheader: don't output version comment at the top |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also: remember to
chmod +x bin/foo