#2104 compilerJs with third party JavaScript libraries

Mic Wed 6 Mar 2013

Hi.

I found the following CoffeeScrtipt example http://eweise.github.com/d3-coffeescript/#basic-barchart which uses D3 and just wonder how to convert it to fantom I.e. replace CoffeeScrtipt language by fantom in order to be ale to compile it with CompilerJs to JavaScript?

Thank you in advance.

Mic

brian Wed 6 Mar 2013

CoffeeScript is more like an alias for JavaScript, so its not really apples to apples. In Fantom you would probably just write that stuff directly in JavaScript, then wrap it as a big Fantom component using the peer stuff.

A great library to look is the source for webfwt which is how we wrap JavaScript with Fantom using that mechanism.

Mic Tue 19 Mar 2013

Recently, I discovered TypeScript which is a superset of JavaScript, and essentially adds optional static typing and class-based object oriented programming to the language.

It would be great if Fantom could do same. Here is an example of D3 combine with TypeScript http://typescript.codeplex.com/SourceControl/changeset/view/ac38ce9e29b3#samples/d3/README.txt .

Login or Signup to reply.