title: How to uglify only changed file with Grunt.js watch task if dynamic expansion in Uglify has been enabled?
body: <p>I have following config in my Gruntfile.js:
  Problem is, that when some file is changed, 'uglify' task is performing as usual for all files. What I am doing wrong?</p>
  
  <pre><code>module.exports = function(grunt) {
      grunt.initConfig({
          pkg     : grunt.file.readJSON('package.json'),
          watch: {
              scripts: {
                  files: ['js/**/*.js'],
                  tasks: ['uglify']
              }
          },
          uglify  : {
              options: {
                  banner: '/*! &lt;%= pkg.name %&gt; &lt;%= grunt.template.today("yyyy-mm-dd") %&gt; */\n',
                  sourceMapRoot: 'www/js/sourcemap/'
              },
              build: {
                  files: [
                      {
                          expand: true,
                          cwd: 'js/',
                          src: ['**/*.js', '!**/unused/**'],
                          dest: 'www/js/',
                          ext: '.js'
                      }
                  ]
              }
          }
      });
  
      grunt.loadNpmTasks('grunt-contrib-watch');
      grunt.loadNpmTasks('grunt-contrib-uglify');
  
      grunt.event.on('watch', function(action, filepath) {
          grunt.config(['uglify', 'build', 'src'], filepath);
      });
  
      grunt.registerTask('default', ['uglify', 'watch']);
  };
  </code></pre>