Move template compilation inside build.js to simplify template choise