Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML minification in sbt build for Playframework

I'm porting a project over to the playframework. Previously I was using htmlcompressor integrated in the build using this maven plugin: http://code.google.com/p/htmlcompressor/#Maven_Plugin

Is anyone aware of a comparable html minification option compatible with sbt that I could integrate into my Playframework build?

Note: I'm well aware that html minification is a last step optimization that matters little and should be applied after all other optimizations are completed, but this is a project that was already been enjoying the benefit of html minification so I'm just exploring the possibility.

like image 953
Dave Maple Avatar asked Dec 30 '12 14:12

Dave Maple


2 Answers

Ranked by possible helpfulness:

  1. How to compress html with PlayFramework
  2. play-minifymod found via this discussion:

    Since Play 1.2.x has no build in support for response optimization like minify and gzip responses this module adds this functionality using the YUI Compressor and googles htmlcompressor

  3. Play framework auto javascript and CSS minifier

like image 80
JSuar Avatar answered Nov 04 '22 03:11

JSuar


Play Framework 2.1 that is about to be released (we already use it in production), has built in support for gzipping html responses. See this pull request - https://github.com/playframework/Play20/pull/375

like image 42
Mirko Adari Avatar answered Nov 04 '22 02:11

Mirko Adari