bajrangCoder / acode-plugin-typescript

Typescript compiler plugin for Acode
7 stars 0 forks source link

wish to run a ts file #3

Open alexbodn opened 6 months ago

alexbodn commented 6 months ago

Hello my friend,

And a big thank for letting me try typescript in the acode in my pocket.

I'd kindly ask to improve your plugin a little to either :-

It may help ts beginners like me that are not yet sure if and how the code would run.

hoping it may help, Alex

bajrangCoder commented 6 months ago

I guess second one is already here. But Your first suggestion is good and applicable in this case , soon I will add a play ▶️ icon which will basically compile ts file and run it inside acode js console

alexbodn commented 6 months ago

Thank you my friend for such a fast reply.

Indeed I tried the second option by myself, hoping acode would detect the newer js and offer to reload it, but it didn't.

If you go the ▶️ approach, will it be possible to compile the ts as it sits in the buffer, possibly in a temporary file, and not force the save, as the user may wish to only test changes before actually saving?

bajrangCoder commented 6 months ago

Thank you my friend for such a fast reply.

I'm currently engaged in another project, which is why I've been active here and noticed your notification about the issue.

If you go the ▶️ approach, will it be possible to compile..........

When you click the play icon, it will compile and save the JavaScript output in a cache file (or potentially keep it in memory). Then, when the user taps and holds the play button, it will compile and save the output to a specified location.