You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Took a quick look at this, since it would be a nice functionality but I don't want to include the entire babel ecosystem for this... My idea was that there should be a way of running trymodule babel-node, have one line of code the re-initialized the repl with the eval function from babel-node (as seen here: https://github.com/babel/babel/blob/1a996cdcc75af6ef9e5178291521acd9b9f3c128/packages/babel-cli/src/_babel-node.js#L136-L137 ) but since no values are exported, I don't think it's gonna be possible. Also, a lot of stuff in the _babel-node.js file is globals, which makes it kind of difficult to integrate, without duplicating the code into here (which is a no-no).
TLDR: too much code to duplicate into here, unless we can find a way to include the functionality without having to depend on babel-node, I don't think this is gonna be possible.
If anyone have any suggestions or feedback on how to make it happen, I'm all ears.
Activity
victorb commentedon Mar 19, 2016
Took a quick look at this, since it would be a nice functionality but I don't want to include the entire babel ecosystem for this... My idea was that there should be a way of running
trymodule babel-node, have one line of code the re-initialized the repl with the eval function frombabel-node(as seen here: https://github.com/babel/babel/blob/1a996cdcc75af6ef9e5178291521acd9b9f3c128/packages/babel-cli/src/_babel-node.js#L136-L137 ) but since no values are exported, I don't think it's gonna be possible. Also, a lot of stuff in the_babel-node.jsfile is globals, which makes it kind of difficult to integrate, without duplicating the code into here (which is a no-no).TLDR: too much code to duplicate into here, unless we can find a way to include the functionality without having to depend on babel-node, I don't think this is gonna be possible.
If anyone have any suggestions or feedback on how to make it happen, I'm all ears.
shockey commentedon Jun 11, 2016
With node 6.x now having solid ES6 coverage, I think this is less of a pressing thing than it was in March.
That being said, a babel-repl module does exist!