abdulhannanali / babel-configuration-tutorial

This is code repo for the short tutorial on configuring babel 6 for your node.js applications
GNU Lesser General Public License v3.0
3 stars 1 forks source link

Following tutorial step by step errors #1

Open ljubadr opened 8 years ago

ljubadr commented 8 years ago

Hey, thank you for taking your time to write this nice tutorial!

I've noticed few things tho:

First: When you run npm install --save-dev babel-cli and then babel code/index.js -d build/ it will fail if babel-cli is not installed globally (but it would run just fine as "script" from package.json)

Example should be: ./node_modules/.bin/babel code/index.js -d build/

On babeljs website (https://babeljs.io/docs/setup/#babel_cli) I found this very useful (as it prevents cases like this)

Note: Since it's generally a bad idea to run Babel globally you may want to uninstall the global copy by running npm uninstall --global babel-cli.

Second: While this line is fine (if we disregard first problem) babel --presets es2015,stage-0 code/index.js -o build/app.js In .babelrs "plugins" should be "presets"

Anyway, thanks again

Cheers

abdulhannanali commented 8 years ago

@ljubadr Thanks for opening this issue, I am aware of the problems in this tutorial, thanks for mentioning these problems, I am aware of some more problems too, and will surely solve them as soon as possible. :+1: