It's tempting to use the Cordova command-line interface directly, but there's a problem with this: there's no great way to ensure what you write works across multiple platforms. If you are certain you'll only work with a specific platform, you can go ahead and execute shell commands instead; but what we're going to do is a bit more flexible.
The code in this section is inspired by https://github.com/kamrik/CordovaGulpTemplate.
The Cordova CLI is really just a thin wrapper around the
cordova-lib project. Everything the Cordova CLI can do,
cordova-lib does as well.
Because the Cordova project will be a build artifact, we need to be able to create a Cordova project in addition to building the project. We'll also need ...