I have the babel cli installed on my machine using:
npm install -g babel-cli
When I run this command I get the desired output. i.e out.js
is created
babel script.js --out-file out.js
but when I try to run that command via npm
I get an error saying
The CLI has been moved into the package `babel-cli`.
$ npm install -g babel-cli
Here's the package.json:
{
"name": "youtubeapiloader",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"compile": "babel -g src/youtube-api-loader.js --out-file youtube-api.js",
"prepublish": "npm run compile"
},
"devDependencies": {
"babel": "^6.1.18"
}
}