I have two variables I use for when I want to either include or exclude system files (using minimatch glob syntax, where the ! stands for exclusion).
var systemFiles = ['node_modules/**/*', '.git/**/*'];
var ignoredSystemFiles = ['!node_modules/**/*', '!.git/**/*'];
But this feels a bit redundant. Is there a simple way to turn the systemFiles array into the ignoredSystemFiles array (i.e.: prefix all items in systemFiles with a !)?
I know !systemFiles does not work, but something as compact as this would be awesome, as it would allow me to eliminate the ignoredSystemFiles variable.
You can use this