PhET build tools. Insert your simulation project. Out comes a pile of stuff, some of which is minified and unrecognizable, but all of which is suitable for deployment.