I just download Babel using npm (npm install -g babel-cli
), but when I use babel-cli to compile code, stdout just returns an identical copy of the uncompiled code I tried to compile.
My babel version is 6.1.18 (babel-core: 6.1.21), and node version is 4.2.2.
I tested both OS X 10.9 and OS X 10.10, they have the same problem.
Bebel does not even work with the code below when I use babel test.js
:
let a = '';
class b {
}