function addIgnorePattern(val) {
  if (val && typeof val === 'string' && val[0] !== '#') {
    let pattern = val;
    if (pattern.indexOf('/') === -1) {
      matchers.push('**/' + pattern);
    } else if (pattern[pattern.length-1] === '/') {
      matchers.push('**/' + pattern + '**');
      matchers.push(pattern + '**');
    }
    matchers.push(pattern);
  }
}
Add glob patterns to ignore matched files and folders.
Creates glob patterns to approximate gitignore patterns.
@param {String} val - the glob or gitignore-style pattern to ignore
@see {@linkplain https://git-scm.com/docs/gitignore#_pattern_format}