If I create a console app and configure it for separate Javascript files then I can create Javascript libraries - after deleting the rtl and main() code from the file. Is there a cleaner way to do this in Delphi or do I need to use the pas2js compiler from the command line?