title: Grunt Uglify cannot access code within a closure
body: <p><strong>Edit: this issue actually seems to be specific to uglifyjs itself. Running the code in an online tool like <a href="http://lisperator.net/uglifyjs/" rel="nofollow">http://lisperator.net/uglifyjs/</a> gives the same results</strong> </p>
  
  <p>I've got a grunt task that simply concatenates some files and then uses uglify to minify the resulting file. </p>
  
  <p>file a:</p>
  
  <pre><code>console.log('this is file a');
  </code></pre>
  
  <p>file b:</p>
  
  <pre><code>(function () {
      console.log('this is file b');
  });
  </code></pre>
  
  <p>The concat works fine and I get concatenated file in my dist directory (testout.js) that looks like this:</p>
  
  <pre><code>(function () {
      console.log('this is file b');
  });
  console.log('this is file a');
  </code></pre>
  
  <p>The the uglify task runs and produces testdist.min.js. Which looks like this:</p>
  
  <pre><code>console.log("this is file a");
  </code></pre>
  
  <p>None of the code from file b is included! As soon as I remove the closure from file b the second console.log is included in uglify's output.   </p>
  
  <p>Here's the entire grunt file.</p>
  
  <pre><code>module.exports = function (grunt) {
  
  grunt.initConfig({
      pkg: grunt.file.readJSON('package.json'),
  
  
  
      concat: {
  
          test: {
               src: [
                  'src/filea.js',
                  'src/fileb.js'
              ],
              dest: 'dist/testout.js'
  
          },
  
      },
  
      uglify: {
          thing: {
              files: {
                'dist/testdist.min.js' : ['dist/testout.js'] 
              }
         }
  
      },
  
  
      watch: {
  
          js: {
              files: ['src/*.js'],
              tasks: ['concat','uglify']
          }
      }
  });
  
  
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-contrib-jshint');
  
  grunt.registerTask('default', ['watch']);
  
  }
  </code></pre>