Skip to content

Instantly share code, notes, and snippets.

@badmonster0
Created May 8, 2015 05:41
Show Gist options
  • Save badmonster0/d071027fad39507b9c9f to your computer and use it in GitHub Desktop.
Save badmonster0/d071027fad39507b9c9f to your computer and use it in GitHub Desktop.
Install the Babel ESNext Transpiler

The new JavaScript language features in ESNext will eventually make it into V8, on which node.js and io.js run. Rather than wait for V8 to support ESNext, we'll use Babel to transpile ESNext code into a JavaScript version currently supported by node.js and io.js.

npm install -g babel                                 # Install Babel
# Alias babel-node to bode with strict and experimental turned on
bodealias="alias bode='babel-node --optional strict --stage 1 -- '"
echo $bodealias >> ~/.bash_profile                   # Persist alias
bode                                                 # Use ESNext today
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment