I don't have time to help you out with that at the moment I'm afraid.
I guess worst case you could just execute espruino -p /dev/cu.usbmodem1421 -w yourfile as a separate process
espruino -p /dev/cu.usbmodem1421 -w yourfile
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I don't have time to help you out with that at the moment I'm afraid.
I guess worst case you could just execute
espruino -p /dev/cu.usbmodem1421 -w yourfile
as a separate process