Add template compilation script