compile script and prod mode