First of all, thanks for all the work on this project!
I tried out Transcript and the end of each generated .js file looks like this:
window ['test'] =test ();
This fails on Node.js because there is no window object when running javascript on the server:
$ node __javascript__/test.js
/Users/ageitgey/Desktop/__javascript__/test.js:977
window ['test'] = test ();
^
ReferenceError: window is not defined
To make the generated code work on Node.js, all you have to do is remove is this:
// Original codewindow ['test'] =test ();
// Change to:test ();
I know your main use case might be to generate .js to run in the browser. But would it be possible to support generating code that doesn't assume there is a window object? Maybe it could be done via an optional parameter if you prefer the current behavior?
First of all, thanks for all the work on this project!
I tried out Transcript and the end of each generated .js file looks like this:
This fails on Node.js because there is no
window
object when running javascript on the server:To make the generated code work on Node.js, all you have to do is remove is this:
I know your main use case might be to generate .js to run in the browser. But would it be possible to support generating code that doesn't assume there is a
window
object? Maybe it could be done via an optional parameter if you prefer the current behavior?