Using Babel in Atom


#1

It appears Babel is baked into Atom:

I create a .js file, and I add the following:

/** @babel */

var foo = () => console.log('foo');

I hit save, and nothing appears to happen. The fat arrow function remains in the original file, and no new transpiled file is created.

Ideally, I would like to retain my es6 source file, and generate a separate transpiled file in another directory. Is that possible?


#2

Babel is supported for creating Atom packages. It doesn’t provide a service for transpiling code in general.


#3

Ah, pity that. Thanks for the response!