Typescript & Uglify Tasks
<p>Ok, so I am playing around with typescript and was hoping to use it to minify my code but as I understand it, typescript does not do that. So I I built my Gruntfile like this, </p>

<pre><code>module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    ts: {
      default: {
        files: {
          '/js/builds/admin.js': ['/typescript/admin/*.ts'],
          '/js/builds/main.js': ['/typescript/main/*.ts'],
          '/js/builds/public.js': ['/typescript/public/*.ts']
        }
      },
      options: {
        fast: 'never',
        sourceMap: false
      },
    },

    'uglify': {
      options: {
        preserveComments: 'some',
      },
      my_target: {
        files: {
          //Libs Files
          '/assets/js/libs.js': [
            '/js/libs/jquery-3.1.1.min.js',
            '/js/libs/underscore-1.8.3.min.js',
            '/js/libs/backbone-1.3.3.min.js',
          ],

          //Plugin Files
          '/assets/js/plugins.js': [
            '/js/plugins/alertify.min.js',
          ],

          //Admin Build
          '/assets/js/our_admin.js': [
            '/js/builds/admin.js'
          ],

          //Main Build
          '/assets/js/main.js': [
            '/js/builds/main.js'
          ],

          //Public Build
          '/assets/js/public.js': [
            '/js/builds/public.js'
          ]
        }
      }
    },

    watch: {
      'TypeFiles': {
        files: ['/typescript/**/*.ts'],
        tasks: ['ts'],
        options: {
          spawn: false
        },
      },

      'JSFiles': {
        files: ['/js/**/*.js'],
        tasks: ['uglify'],
        options: {
          spawn: false,
        },
      },
    }
  });

  grunt.loadNpmTasks("grunt-ts");
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-watch');
};
</code></pre>

<p>and what I was trying to do was get typescript to build into standard javascript and then auto run the my uglify task. </p>

<p>As it stands, it works if I added / edit any lib or plugin files (as they have nothing to do with my typescript) but when I edit the typescript files, it will build the JS files, but not run the uglify task?</p>

<p>So how do I get it to do the uglify task after the ts task is completed?</p>

<p>Many thanks.</p>