1 | const basename = require('path').basename;
|
2 | const minimatch = require('minimatch');
|
3 |
|
4 | module.exports = input => {
|
5 | const ignore = input.configuration.ignore || [];
|
6 | const config = Array.isArray(ignore) ?
|
7 | ignore : ignore.split(',');
|
8 | return !config.some(pattern => {
|
9 | return minimatch(input.path, pattern) ||
|
10 | basename(input.path) === pattern;
|
11 | });
|
12 | };
|