Extract inline JS templates to precompiled EJS templates