Compiles all templates into one js variable.