publish: Exposing client-side JS code to the server (needs a better way...).

generated from commit e567c8336f34aca73a50d2d91f341212889c8ef5