script to compile the legacy JS code