O'Reilly logo

Play Framework Essentials by Julien Richard-Foy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing assets from the build system

The previous sections showed how your Play application can serve static files such as JavaScript or CSS files. However, many people prefer not to write JavaScript or CSS code directly. Rather, they generate it from higher-level languages such as CoffeeScript and Less. Furthermore, you might want to minify and gzip these files as they don't need to be read by humans anymore when they are executed by web browsers and compressing them can save some bandwidth.

The build system of your Play application can manage such processing steps for you and make the produced assets available to your application as if they were static files in the public/ directory. This work is achieved by an sbt plugin family named sbt-web, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required