Skip to content

Instantly share code, notes, and snippets.

@MikeNats
Forked from surganov/babel-sublime.md
Created March 6, 2016 23:01
Show Gist options
  • Save MikeNats/dc9a6ce66d44f4841c72 to your computer and use it in GitHub Desktop.
Save MikeNats/dc9a6ce66d44f4841c72 to your computer and use it in GitHub Desktop.
  • Open Sublime Menu → Tools → Build System → New Build System...
  • Paste this code:
{
  "cmd": ["babel-node", "$file"],
  "selector": "source.js",
  "path": "/usr/local/bin:$PATH", // ENV setting for mac users
  "quiet": true // get rid of annoying `[Finished in %fs]`
}
  • Save file as babel.sublime-build
  • Create js file, write something like console.log('Hello, Wold');, hit save.
  • Choose babel build system within that file via Sublime Menu → Tools → Build System → babel
  • Hit ⌘B and open build results via Sublime Menu → Tools → Build Result → Show Build Result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment