Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 619
Dirk Avatar asked Feb 06 '26 03:02

Dirk


1 Answers

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).

like image 107
peduxe Avatar answered Feb 09 '26 02:02

peduxe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!