I'm trying to compile a simple es6
file with babel CLI
Given the details below: what's going wrong?
$ node --version
v5.0.0
$ npm --version
3.3.6
$ npm init
$ npm install --save-dev babel-cli
$ echo -e 'import url from "url"\nconsole.log(`2+2=${2+2}`)' > script.js
$ ./node_modules/.bin/babel script.js
import url from "url";
console.log(`2+2=${ 2 + 2 }`);
In other words: I put in ES6 and I get out ES6 (albeit with slightly different spacing, and semicolons added). I'm expecting to see imports converted to requires, and to see my back-ticks disappear.
That is: I want ES5 out.