npm - babel-cli not working as expected -


i had installed babel-cli globally using npm. , had script.js file contains es6 code. when tried compile using $babel script.js -o out.js, copy contains of script.js out.js.

as far concern, should convert es6 code es5.

even if run script.js file without content, should show "use strict"; in out.js. shows empty file. unable figure out whats wrong?

moreover unable understand why "https://www.npmjs.com/package/babel-cli" says install babel-cli globally "https://babeljs.io/docs/setup/#babel_cli" says install locally.

when installed babel-cli locally , try compile script.js file shows

'babel' not recognized internal or external command, operable program or batch file.

this should answer question worked me. https://github.com/babel/babel/issues/4066

or install babel-cli globally , try works then.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -