java.lang.Object
ro.isdc.wro.extensions.processor.support.coffeescript.CoffeeScript

public class CoffeeScript extends Object

CoffeeScript is a little language that compiles into JavaScript. Underneath all of those embarrassing braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.

This processor loads coffee-script library from the webjar.

Since:
1.3.6
Author:
Alex Objelean
  • Constructor Details

    • CoffeeScript

      public CoffeeScript()
  • Method Details

    • getCoffeeScriptAsStream

      protected InputStream getCoffeeScriptAsStream() throws IOException
      Override this method to use a different version of CoffeeScript. This method is useful for upgrading coffeeScript processor independently of wro4j.
      Returns:
      The stream of the CoffeeScript.
      Throws:
      IOException
    • compile

      public String compile(String data)
      Validates a js using jsHint and throws LinterException if the js is invalid. If no exception is thrown, the js is valid.
      Parameters:
      data - js content to process.
    • setOptions

      public CoffeeScript setOptions(String... options)
      Parameters:
      options - the options to set