title: How to configure grunt copy task to exclude .js files from a subdirectory
body: <p>I am using <code>grunt-contrib-copy</code> to copy folders and files from my <code>src</code> folder to <code>build</code> folder. But I want to exclude all <code>.js</code> files from the app subdirectory in my <code>src</code> directory.
  This is my Gruntfile. But it is copying all <code>.js</code> files from the subdirectories in app directory instead of excluding. What changes should I make to make it work.</p>
  
  <p>This is my grunt file:</p>
  
  <pre><code>module.exports = function(grunt) {
    grunt.initConfig({
  pkg: grunt.file.readJSON('package.json'),
      // Task configuration.
  concat: {
    dist: {
      src: ['src/app/**/*.js'],
      dest: 'build/app.min.js'
    }
  },
      copy: {
      main: {
        files: [
           //includes files within path and its sub-directories
              //{src: ['src/**', '!/src/app/**/*.js'], dest: 'build/', filter: 'isFile'}
          {expand: true, src: ['src/**', '!/src/app/**/*.js'], dest: 'build/', filter: 'isFile'}
        ]
      }
  } 
  });
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-copy');
   grunt.registerTask('default', ['concat', 'copy']);
  };
  </code></pre>
  
  <p>Reference: <a href="https://stackoverflow.com/q/15199092/2469747">Configure grunt copy task to exclude files/folders</a></p>
  
  <p>Thanks.</p>