title: How do I tell Babel CLI to ignore any path with "__" in it?
body: <pre><code>"@babel/cli": "^7.2.3",
  </code></pre>
  
  <p>Seems really simple. </p>
  
  <p><a href="https://babeljs.io/docs/en/babel-cli#ignore-files" rel="nofollow noreferrer">https://babeljs.io/docs/en/babel-cli#ignore-files</a></p>
  
  <pre><code> babel src --out-dir lib --ignore "src/**/*.spec.js","src/**/*.test.js"
  </code></pre>
  
  <p>So I set it up like so: </p>
  
  <pre><code>babel src --out-dir cjs --ignore "**/_*" --copy-file --watch
  </code></pre>
  
  <p>Glob reference: <a href="https://github.com/isaacs/node-glob" rel="nofollow noreferrer">https://github.com/isaacs/node-glob</a></p>
  
  <p>But I see this in the output: </p>
  
  <pre><code>add:cjs/__mocks__/@xyz/common-fn.js
  add:cjs/middleware/__mocks__/uuid.js 
  </code></pre>
  
  <p>OK I try this: </p>
  
  <pre><code>babel src --out-dir cjs --ignore "**/_+","_+" --copy-file --watch
  </code></pre>
  
  <p>And these: </p>
  
  <pre><code>babel src --out-dir cjs --ignore "**/_*/*.*\ --copy-file --watch 
  babel src --out-dir cjs --ignore "**/__mocks__/*.*",  --copy-file --watch 
  babel src --out-dir cjs --ignore "[src|middleware]/**/__mocks__/*.*" --copy-file --watch"
  babel src --out-dir cjs --ignore "**/_+/**/*.*" --copy-file --watch
  </code></pre>
  
  <p>Same result every time. <strong>It really seems like that last one should work:</strong> ignore any path with zero or more directories followed by a directory that has at least one _ in the name, then zero or more directories then a file matching any pattern. Am I reading that right? </p>
  
  <p>Then I tried being very specific: </p>
  
  <pre><code>babel src --out-dir cjs --ignore "nes/middleware/__mocks__/*.js", --copy-file --watch
  </code></pre>
  
  <p>And I get: </p>
  
  <pre><code>add:nes/middleware/__mocks__/localize.js
  </code></pre>
  
  <p>I can't tell if this is a bug in Babel or me misunderstanding glob patterns. </p>