title: How to enable Closure Compiler's minification feature in Play 2.0
body: <p>According to the documentation here: <a href="https://github.com/playframework/Play20/wiki/AssetsGoogleClosureCompiler" rel="nofollow">https://github.com/playframework/Play20/wiki/AssetsGoogleClosureCompiler</a> it says:</p>
  
  <blockquote>
    <p>Any JavaScript file present in app/assets will be parsed by Google Closure compiler, checked for errors and dependencies and minified if activated in the build configuration.</p>
  </blockquote>
  
  <p>However I can't find out how to set this in the build configuration, I tried adding the code:</p>
  
  <pre><code>val main = PlayProject(appName, appVersion, mainLang = SCALA).settings(
      javascriptEntryPoints &lt;&lt;= baseDirectory(base =&gt;
          base / "app" / "assets" / "javascripts" ** "*.js"
      )
  )
  </code></pre>
  
  <p>in build.scala however I can't find any minified JavaScript files. </p>
  
  <p>Here are the steps I've tried:</p>
  
  <ol>
  <li><p>Add the above code in build.scala</p></li>
  <li><p>Create a JavaScript file in app/assets/javascripts</p></li>
  <li><p>Type "compile" in the Play console and notice that no minified JavaScript files are produced in app/assets/javascripts or public/javascripts</p></li>
  </ol>
  
  <p>However, I have noticed that if I write some invalid JavaScript, I'll get an error message (e.g. on 127.0.0.1:9000 - Compilation error) so it looks like closure compiler is checking for errors successfully, however I'm not sure how to do the minification.</p>
  
  <p>While on the subject of minification, is it possible to use the regular (non-minified) JavaScript file <strong>only</strong> in development mode, but in production, use the minified version?</p>
  
  <p>Thanks</p>