Wrap each JS file in self-invoking function before concatenating
Fix production builds — compile templates before copying to `dist`