Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: restore

CoffeeScript (http://coffeescript.org) is a language that compiles down to JavaScript.

Div
stylefloat:right
titleRelated Articles
classaui-label
Content by Label
showLabelsfalse
showSpacefalse
titleRelated Articles
cqllabel = "javascript" and space = currentSpace()

Starting with version 5.4, Tapestry can automatically compile your CoffeeScript code into JavaScript on the fly. This is done with the optional tapestry-webresources module. It is highly recommended for anyone who wants to use CoffeeScript in their application ... just let Tapestry do the compilation at runtime (with access to Tapestry's full exception reporting capabilities).

To use the tapestry-webresources module, just add the JAR to your project. For example, if you're using Maven:

Code Block
languagexml
titlepom.xml (partial)
<dependency>
    <groupId>org.apache.tapestry</groupId>
    <artifactId>tapestry-webresources</artifactId>
    <version>${tapestry-release-version}</version>
</dependency>

All of Tapestry's own client-side code is written in CoffeeScript and compiled, at build time, to JavaScript.

Info

You are completely free to use either JavaScript or CoffeeScript in your Tapestry application.

CoffeeScript versus JavaScript

...