More conservative glob against dep tests

When creating builds, we were using a glob that was too liberal in its
matching to identify and clean test files in our dependencies in order
to shave some bytes off of our final build. We now only remove files or
directories that outright match either "test" or "tests" rather than any
file or directory that even includes the word "test" in it.

Fixes #5636
This commit is contained in:
Court Ewing 2015-12-10 13:57:54 -05:00
parent ac3efaa71b
commit ea23878435

View file

@ -3,7 +3,7 @@ module.exports = function (grunt) {
return {
build: 'build',
target: 'target',
testsFromModules: 'build/kibana/node_modules/**/*test*/**',
testsFromModules: 'build/kibana/node_modules/**/{test,tests}/**',
deepModuleBins: 'build/kibana/node_modules/*/node_modules/**/.bin/{' + modules.join(',') + '}',
deepModules: 'build/kibana/node_modules/*/node_modules/**/{' + modules.join(',') + '}/',
};