n-riesco / jp-babel

jp-babel is a babel kernel for the Jupyter notebook
Other
86 stars 16 forks source link

Side effects (stdout) are not shown in correct cell on full rerun #6

Closed martinhoefling closed 7 years ago

martinhoefling commented 8 years ago

When you run multiple cells by 'run all', the output of all cells is shown for the last one. I.e. when you use console.log(). Not sure if this is related but a function () {} evaluation returns 'use strict'. Is this intended?

n-riesco commented 8 years ago

This bug is also present in IJavascript and jp-coffeescript. We are discussing how to address this bug here.

PS: The use strict output is unrelated. It's a consequence of how I've implemented a Babel shell. The idea is that jp-babel takes the code in the cell (in this case function f(){}), calls Babel to transpile the code into javascript as "use strict"; function f(){}, which jp-babel outputs simply as "use strict".