title: How to automate js files join for prod deploy in play framework
body: <p>I'm working on a project where the front end uses AngularJs (it is a SPA) and the backend uses Play Framework 1.3. Our angularJs file is growing up fast so it would be nice to split it and use some kind of directory structure to keep organized all of the directives, controllers, filters, etc in diferent files. But I only want this in dev enviroment.</p>
  
  <p>When we deploy to a production server we want to find an automated solution to 'join' all the js files into a single minified version.</p>
  
  <p>So for example in production the index.html should look like this:</p>
  
  <pre><code>&lt;script src="some/dir/myAngularCode.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>and in dev environment I want it to look like this:</p>
  
  <pre><code>&lt;script src="/some/dir/controllers/controller-1.js"&gt;&lt;/script&gt;
  &lt;script src="/some/dir/controllers/controller-2.js"&gt;&lt;/script&gt;
  &lt;script src="/some/dir/directives/directive-1.js"&gt;&lt;/script&gt;
  &lt;script src="/some/dir/directives/directive-2.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>and so on...</p>
  
  <p>Could you guide me to do this? I couldn't find anything related to Play Framework,thereare lots of examples with nodejs but we are not using node here.</p>
  
  <p>Thanks in advance!</p>