Generate js before publish