Developing mobile apps using Apache Cordova or any other platform involves constantly deploying your app to real devices. This process can become tedious because the phone or tablet must be connected via USB cable to your computer. However, you can connect your device via WiFi and deploy and debug your app normally following these steps.
If you are experiencing a noticeably high battery loss while your MacBook Pro / Air enters sleep mode, try one of these methods to fix the problem. Ideally, your Mac should lose something between 0 to 1% of battery while sleeping overnight without the charger.