How to compile and run PhoneGap Developer App?

Report
Question
11 views

Please explain why do you think this question should be reported?

Report Cancel

The app bundles the phonegap npm module as a dependency. This means that there is no need for a global installation of phonegap or cordova. By editing the package.json, you can specify the exact version of phonegap to compile the project.

Since a global install of the phonegap module is not required, we use npm run scripts to compile and run the application. This allows the app's platforms/ and plugins/ directories to be removed and rebuilt each time, ensuring a consistent build using the correct PhoneGap, Cordova, platform, and plugin versions.

The command structure is:

$ npm run phonegap -- <command> [args]

For example, you can check the version of phonegap:

$ npm run phonegap -- --version

You can compile and run iOS or Android:

$ npm run phonegap -- run ios
$ npm run phonegap -- run android
Please follow and like us:

About the Author