Grunt Concat Task: How to exclude some files?

I have the following task:

concat: {
       js: {
       src: ['app/**/**/*.js',
             '!app/**/**/*test.js'],
         dest: 'app/scripts.js'
       }
}

      

But that doesn't exclude js files that end with test

. What pattern should you use to exclude these files?

+3


source to share


1 answer


This should work:



concat: {
  js: {
    src: [
      'app/**/*.js',
      '!**/*test.js'
    ],
    dest: 'app/scripts.js'
  }
}

      

+6


source







All Articles