Feature/reliable templates

My "works for me" solution to issue #35.   Up for discussion.


See companion patch to Gruntfile.js in commit (or pasted right here below)

diff --git a/ui/Gruntfile.js b/ui/Gruntfile.js
index a5365af..225ae08 100644
--- a/ui/Gruntfile.js
+++ b/ui/Gruntfile.js
@@ -132,6 +132,12 @@ module.exports = function (grunt) {
 
     // Empties folders to start fresh
     clean: {
+      twirl: {
+        files: [{
+          dot: true,
+          src:['twirl']
+        }]
+      },
       dist: {
         files: [{
           dot: true,
@@ -333,6 +339,24 @@ module.exports = function (grunt) {
 
     // Copies remaining files to places other tasks can use
     copy: {
+      'twirl-dev': {
+        files: [{
+           expand: true,
+           dot: true,
+           cwd: '<%= yeoman.app %>',
+           dest: 'twirl',
+           src: ['*.scala.html']
+        }]
+      },
+      'twirl-dist': {
+         files: [{
+           expand: true,
+           dot: true,
+           cwd: '<%= yeoman.dist %>',
+           dest: 'twirl',
+           src: ['*.scala.html']
+         }]
+      },
       dist: {
         files: [{
           expand: true,
@@ -400,7 +424,6 @@ module.exports = function (grunt) {
     grunt.task.run([
       'clean:server',
       'wiredep',
-      'concurrent:server',
       'autoprefixer',
       'watch'
     ]);
@@ -419,7 +442,13 @@ module.exports = function (grunt) {
     'karma'
   ]);
 
-  grunt.registerTask('build', [
+  grunt.registerTask('build-dev', [
+    'clean:twirl',
+    'copy:twirl-dev'
+  ]);
+
+  grunt.registerTask('build-dist', [
+    'clean:twirl',
     'clean:dist',
     'wiredep',
     'useminPrepare',
@@ -432,12 +461,13 @@ module.exports = function (grunt) {
     'cssmin',
     'uglify',
     'filerev',
-    'usemin'
+    'usemin',
+    'copy:twirl-dist'
   ]);
 
   grunt.registerTask('default', [
     'newer:jshint',
 //    'test',
-    'build'
+    'build-dev'
   ]);
 };
thyde ~/kairos fe