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
detect extension-less CoffeeScript scripts #90
Comments
👍 I've got a few of those in my codebase as well, and they all have no extension and One difficulty here is what to do with the git history. Currently the code assumes that all files end in Also, I guess it would make sense to modify the shebang line to run node instead? Also maybe we'd need to use babel-register, but I'd also like to avoid making those kinds of assumptions, I think. This could also be done in more of a one-off way for each case, like renaming the file to .coffee beforehand, then renaming the .js file back and changing the shebang line afterward. For decaffeinate-examples, this could be done with a patch before and a patch after. |
decaffeinate already patches it to replace |
Ah, neat, I hadn't seen that. |
Progress toward #90 We don't auto-discover them yet, but this adds all of the cases in terms of doing the correct move operations. Also, we now detect shebang lines when prepending the results comment and put them after the shebang line.
Progress toward #90 We don't auto-discover them yet, but this adds all of the cases in terms of doing the correct move operations. Also, we now detect shebang lines when prepending the results comment and put them after the shebang line.
The decaffeinate-examples fork of hubot still has
bin/hubot
as CoffeeScript because bulk-decaffeinate doesn't find it. We could pretty easily look in all extension-less files (maybe that are executable?) and look for a shebang line like this:#!/usr/bin/env coffee
.The text was updated successfully, but these errors were encountered: