-
Notifications
You must be signed in to change notification settings - Fork 10
Does decaf have a cli? #8
Comments
I would like to see this documented too. |
A cli feature is on the short-term roadmap, @systeminsightsbuild @karlhorky how do you expect using a tool like that? Should it transform your files or create new ones? I know it seems simple enough but I'd like to hear use-cases to design this well :) |
This is exactly why I created decaffeinate. The intent is to completely replace your My suggestion would be that a CLI for decaf should write $('.form')
.find('.button')
.attr('enabled', false)
.end()
.find('.input')
.addClass('invalid'); That problem is the original reason I took the approach I did with decaffeinate (string edits based on AST). Using recast as a printer is a good approach in that you'll always end up with valid JS (not something decaffeinate always does) and the transformation is more straightforward (I'm not very proud of how messy decaffeinate's source is), but it makes the above into a harder problem. Trade-offs are a bummer 👎 |
Yup, I'd like to be able to translate my coffee to es6, and leave the coffee behind .. es6 along with the JS Standard Style has made JS good enough. I realize this is not the goal of decaf but... Yes, I'll miss several features, but at this point, I think Babel will be in our code for ever, modules for example, and may be all we need for some missing features. A question: does decaf plan to translate CS Classes to es6 Classes? There are some differences, but I'm fine giving up some corner cases for convergence with the rest of the JS world! -- Owen |
@backspaces that is exactly the (original) goal of decaf. Classes are supported right now yes! please have a look at the test suite for more info of what exactly is supported. |
decaf now has a cli :) |
I don't want a runtime transform, but rather fully convert the coffeescript (even if that means some post manually work).
Does decaf support that mode?
The text was updated successfully, but these errors were encountered: