<h4 dir="auto">What I expect to happen:</h4>
<p dir="auto">Given the following file:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Polygon.js

class Polygon {  
  constructor(height, width) {
    this.height = height;
    this.width = width;
  }

  get area() {
    return this.calcArea()
  }

  calcArea() {
    return this.height * this.width;
  }
}"><pre class="notranslate"><span class="pl-c">// Polygon.js</span>

<span class="pl-k">class</span> <span class="pl-v">Polygon</span> <span class="pl-kos">{</span>  
  <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">height</span><span class="pl-kos">,</span> <span class="pl-s1">width</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">height</span> <span class="pl-c1">=</span> <span class="pl-s1">height</span><span class="pl-kos">;</span>
    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">width</span> <span class="pl-c1">=</span> <span class="pl-s1">width</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>

  <span class="pl-k">get</span> <span class="pl-en">area</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">calcArea</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span>

  <span class="pl-en">calcArea</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">height</span> <span class="pl-c1">*</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">width</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">I would expect the command <em><code class="notranslate">babel Polygon.js</code></em> to emit ES5-compatible code.</p>
<h4 dir="auto">What <em>actually</em> happens:</h4>
<p dir="auto">The same ES6 file is returned, unmodified.</p>
<p dir="auto">There are no errors to report.</p>
<h4 dir="auto">Other</h4>
<ul dir="auto">
<li>I installed <code class="notranslate">babel</code> and then <code class="notranslate">babel-cli</code> globally. I tried on Node 4.2.1 and Node 0.12.7. I am running on Ubuntu 15.04.</li>
<li>I got the above code example from <a href="http://www.programwitherik.com/what-is-babel-the-javascript-compiler/" rel="nofollow"><em>this tutorial</em></a>.</li>
<li>This problem is not specific to the <em>Polygon.js</em> example above. I used that as an example. I tried <code class="notranslate">babel</code> with numerous stand-alone scripts (including ones <em>without</em> classes) and the problem persists.</li>
</ul>
<p dir="auto">I use <a href="https://github.com/iamstarkov/generator-tiny-es-nm">generator-tiny-es-nm</a> by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/iamstarkov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/iamstarkov">@iamstarkov</a>. It has <code class="notranslate">"babel": "*"</code> dep and transpile <code class="notranslate">index.js</code> through:</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;transpile&quot;: &quot;babel index.js --out-file index.es5.js&quot;"><pre class="notranslate"><span class="pl-ent">"transpile"</span>: <span class="pl-s"><span class="pl-pds">"</span>babel index.js --out-file index.es5.js<span class="pl-pds">"</span></span></pre></div>
<p dir="auto">Well, I know, after 6.0 there is <code class="notranslate">babel-cli</code> package, but if I install <code class="notranslate">babel-cli</code> and then run <code class="notranslate">npm run transpile</code>, it doesn't transpile anything. It just create new file and copy its content:</p>
<p dir="auto"><em>index.js</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pkg from './package'

console.log(pkg.version);"><pre class="notranslate"><code class="notranslate">import pkg from './package'

console.log(pkg.version);
</code></pre></div>
<p dir="auto"><em>index.es5.js</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pkg from './package';

console.log(pkg.version);"><pre class="notranslate"><code class="notranslate">import pkg from './package';

console.log(pkg.version);
</code></pre></div>
<p dir="auto">So, I still use <code class="notranslate">babel@^5</code> and don't understand what's going on. Is that my mistake or whatever?</p>