I am trying to use babel to transpile ES6, but it's not working. I'm doing a very basic example, so here must be something obvious I am missing.
I installed babel via npm:
$ npm install -g babel-cli
My file, test.js
:
const input = [1, 2, 3];
console.log(input.map(item => item + 1)); // [2, 3, 4]
The command I'm running:
$ babel test.js
And the output:
const input = [1, 2, 3];
console.log(input.map(item => item + 1)); // [2, 3, 4]
Note that it's unchanged. I expect it to be transpiled...what could be going on here?