Some Coffee

I feel like a small sinner here for asking a feature in an already awesome product, but let’s just drop it here anyway :slight_smile:

Coming from a nodeJS and Ruby background I have come to love Coffeescript a lot. The markup based language handles certain things way better then plain javascript, like it’s way of using variables, doing functions, defining classes and loops, loops in coffeescript are absolutetly amazing.

Fuse would absolutely become the bomb for me if you guys can somehow start supporting the compilation of coffeescript.

on that note, getting this post to hang a bit between Feature Req and the How-to Discussions, does anyone around here know a tool fit for sublime where coffeescript is saved as a javascript file while saving it?

Hi :slight_smile:

You read our minds!

We are actually experimenting with support for compile-to-JavaScript languages on top of Fuse, to enable a broad selection of languages to build your logic in. CoffeScript, TypeScript, F#, and many other languages should in theory be possible.

Imagine going:

<App>
    <CoffeScript>
        ...

Or

<App>
    <FSharp>
        ...

:slight_smile:

No promises on when this will ship, but yeah, we are playing with it :slight_smile:

It should actually be pretty straight forward to create your own JavaScript pre-processor in Fuse. You can extend the Fuse.Reactive.JavaScript class and pre-process the code string before passing it to JS. I’ll make sure we include enough public hooks to allow this.

" …"

What I can’t wait for.

Using Fuse with CoffeeScript is actually pretty nice already. Just put your CoffeScript in a separate file, and use coffee -w to listen for changes and automatically re-compile it to JavaScript whenever you save it. If you include that JavaScript file in your Fuse project, you will get live reload of your CoffeeScript changes directly in Fuse, with no manual intervention!

For instance, you can have your CoffeeScript in cs/whatever.coffee, which auto-compiles to js/whatever.js, and then do <JavaScript File="js/list.js"/> in you UX file. Whenever you change cs/whatever.coffee, your Fuse app reflects these changes instantaneously.

Demo: https://twitter.com/knatten/status/665278289880174592

Anders Lassen wrote:

:slight_smile:

No promises on when this will ship, but yeah, we are playing with it :slight_smile:

It should actually be pretty straight forward to create your own JavaScript pre-processor in Fuse. You can extend the Fuse.Reactive.JavaScript class and pre-process the code string before passing it to JS. I’ll make sure we include enough public hooks to allow this.

This would be epic, I would love to hack built in F# support here!