lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2.03k stars 44 forks source link

Feature: see transpilation code, turn off transpilation #38

Closed getify closed 5 years ago

getify commented 5 years ago

I would, at times, like to see whatever the transpiled version of my code is actually being run by RunJS. This is useful for realizing why a bug may be happening.

I am thinking maybe there could just be an extra popup window or something that I could click a button to see the most recent transpiled code that ran.

Also, it would be really helpful if I could, perhaps with a preference option, turn off transpilation, and have RunJS just execute my code as-is. I imagine that maybe you're instrumenting code to get the line-by-line outputs printed, so I know you may actually still need to pass it through some Babel transformer. But you could use some options to Babel which turns off all its normal code transformations, and only do the transformations you need for your line outputs.

lukehaas commented 5 years ago

Transpilation is already an option in the preferences. Showing the transpiled code seems reasonable. I'll add it to my to-do list.

getify commented 5 years ago

Transpilation is already an option in the preferences.

Oh, sorry... missed that, thanks!

lukehaas commented 5 years ago

In version 1.3.0 you can now view transpiled code, via the View menu.

screenshot 2019-02-17 at 16 16 28