Skip to content

Instantly share code, notes, and snippets.

@surganov
Created May 3, 2015 21:53
Show Gist options
  • Save surganov/87878ae89581d1fb0573 to your computer and use it in GitHub Desktop.
Save surganov/87878ae89581d1fb0573 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
@alexkuz
Copy link

alexkuz commented May 3, 2015

I prefer using Makefile with Sublime Make build system. This way you don't need to switch to another build system for every project. It's also old-school and kosher.

@northamerican
Copy link

I'm able to see the results but no file is built. Are you able to build a transpiled file with this?

@JesseAldridge
Copy link

👍 thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment