How to convert javascript code to executable file. Preferably, the executable file has a small size. Is it possible?
Almost any script can be packaged into an executable using a packer like BoksedApp Packer or any similar programs. But I'm not sure that the file size will be small. This needs to be checked.
Read about "portable applications" and you will understand how it works. In fact, you can create a portable application from your script and run it wherever you want.
Not all packers can package dependencies and create an independent executable file. But most can do it.