JS-ify build.py