I know about JSNI but the problem is that your whole project has to use and conform to GWT in order to use it. I'm looking for something that I can make a call to which can take the Javascript code I've written in Java and generate it into a file or series of files.
I know that scripting engines can be used to execute javascript code, however, I have not found any that actually allow you to build up your javascript using Java. Most of them require javascript in the form of a string.
Are there any libraries that offer this functionality?