Last active
June 8, 2016 08:21
-
-
Save mrister/657ed52e1bd836a9c13cbb6df4f008e6 to your computer and use it in GitHub Desktop.
Babel example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# install babel cli and preset | |
npm install --save-dev babel-cli babel-preset-es2015 | |
# do the transpiling of original.js file to transpiled.js | |
babel original.js --out-file=transpiled.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// small example | |
let tests= ['one', '2', 'III']; | |
const test = () => console.log(...tests); | |
test(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var tests = ['one', '2', 'III']; | |
var test = function test() { | |
var _console; | |
return (_console = console).log.apply(_console, tests); | |
}; | |
test(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment