generate precompiled template