Make the build app self contained.
[e-mobility-charging-stations-simulator.git] / Gruntfile.js
index cc434c1706ed31bac8384dc0f1232419bf975d09..eeaeb558884a885df61876c18864d9e0371759f0 100644 (file)
@@ -3,12 +3,35 @@ module.exports = function(grunt) {
     pkg: grunt.file.readJSON('package.json'),
     ts: {
       tsconfig: './tsconfig.json',
-      dev: {
-        watch: './src'
+      buildWatch: {
+        watch: './src',
       },
       prod: {}
+    },
+    mkdir: {
+      assets: {
+        options: {
+          create: ['dist/assets'],
+        }
+      }
+    },
+    copy: {
+      assets: {
+        files: [{
+          expand: true,
+          cwd: 'src/assets',
+          src: '**',
+          dest: 'dist/assets',
+        }]
+      },
+    },
+    clean: {
+      build: ['dist'],
     }
   });
+  grunt.loadNpmTasks('grunt-contrib-clean');
+  grunt.loadNpmTasks('grunt-mkdir');
+  grunt.loadNpmTasks('grunt-contrib-copy');
   grunt.loadNpmTasks('grunt-ts');
-  grunt.registerTask('default', ['ts:prod']);
+  grunt.registerTask('default', ['clean:build', 'ts:prod', 'mkdir:assets', 'copy:assets']);
 };