externalize js template