To add the ESP boards to the board list in Arduino, you
- Add the line http://arduino.esp8266.com/stable/package_esp8266com_index.json into the preferences pane, in the "Additional Boards Manager URLs"
- Then open Tools -> Board -> Boards Manager and install ESP8266
Next, you need to make sure you can select the proper port it's connected to. To do that, you install the driver from here
Then, you choose the port named "/dev/cu.SLAB_USBtoUART"
Now you're ready to build and upload as usual for your NodeMCU board!
Sources:
https://github.com/esp8266/Arduino
http://www.instructables.com/id/Quick-Start-to-Nodemcu-ESP8266-on-Arduino-IDE/
https://roboindia.com/tutorials/nodemcu-amica-esp8266-board-installation