Compiled assets in Play must be defined in the
public/ folder as other unmanaged assets, meaning that there is no difference in the way you use them once compiled.
For example a CoffeeScript source file
CoffeeScript sources are compiled automatically during an
assets command, or when you refresh any page in your browser while you are running in development mode. Any compilation errors will be displayed in your browser:
Here is an example layout for using CoffeeScript in your projects:
§Enablement and Configuration
CoffeeScript compilation is enabled by simply adding the plugin to your plugins.sbt file when using the
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
The plugin’s default configuration is normally sufficient. However please refer to the plugin’s documentation for information on how it may be configured.
Next: Using LESS CSS
Found an error in this documentation? The source code for this page can be found here. After reading the documentation guidelines, please feel free to contribute a pull request.