How do I preprocess/run a .js file in Atom?

787 Views Asked by At

Given the following file, and a newly downloaded version of Atom 1.0, how do I preprocess / run it?

"use babel";

function* count(n){
    console.log(n);
}

The "use babel" is as per this post on the Atom blog.

1

There are 1 best solutions below

0
On BEST ANSWER

This pragma is related to creating packages in atom. If you want to transpile using babel you need to use the babel CLI or another method (task runner: grunt, gulp i.e).