Make babel exclude test files
<p>On my build step I'm using babel to transpile the code to es5 (from <code>src</code> to <code>dist</code>). How do I make it exclude files ending in <code>.test.js</code>?</p>

<p>package.json</p>

<pre><code>"scripts": {
  "build": "babel src --out-dir dist",
</code></pre>

<p>.babelrc</p>

<pre><code>{
  "presets": [ "es2015" ],
  "ignore": "\\.test\\.js"
}
</code></pre>