This is now out of date, as the build process has been added to Espruino
git clone https://github.com/espruino/Espruino.git
cd Espruino
source scripts/provision.sh ESP32
make clean && BOARD=ESP32 make
Please see for more details https://github.com/espruino/EspruinoBuildTools/tree/master/esp32