Compile js template