How to edit the generated scripts?

We recommend VS Code. Install the Cordova Tools extension. You can even run the app in VS Code.