Created
August 3, 2017 08:34
-
-
Save lukeaus/d7ccf1007a7c36966289940f38a52920 to your computer and use it in GitHub Desktop.
Get started in Visual Studio Code with Babel Quickly
This file contains hidden or 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
// Terminal | |
npm init | |
npm install --save babel-cli babel-preset-env | |
// Visual Studio Code | |
// Tasks --> Configure Tasks | |
// tasks.json | |
{ | |
"version": "0.1.0", | |
"command": "${workspaceRoot}/node_modules/.bin/babel-node", | |
"isShellCommand": true, | |
"showOutput": "always", | |
"tasks": [ | |
{ | |
"args": ["${fileBasename}"], | |
"taskName": "babel (run)", | |
"suppressTaskName": true, | |
"isBuildCommand": true, | |
"isBackground": false | |
} | |
] | |
} | |
// next steps | |
// 1. create your file.js | |
// 2. make sure it contains a console.log(‘boo') statement or nothing will appear | |
// 3. Task —> Run Task —> babel (run) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment