Book Image

PhoneGap Beginners Guide (third edition)

Book Image

PhoneGap Beginners Guide (third edition)

Overview of this book

Table of Contents (22 chapters)
PhoneGap Beginner's Guide Third Edition
About the Authors
About the Reviewers
Related Plugin Resources

Using the PhoneGap CLI

You can use the Cordova command-line interface to initialize the project code, after which you can use various platforms' SDKs to develop them further. In the previous chapter, we discussed how to create a new project, add the required platforms, and build them using the CLI.

Apart from creating a project by using the CLI tool, there are several other functions carried out by the CLI of Cordova. As the steps for installing the CLI are already covered, let's move on with advanced CLI usage. Once you create a project, use cd to move into it and you can execute a variety of project-level commands.

The following is the list of the most used CLI commands:

  • platform add <platform>: This adds a platform as a build target for the project.

  • platform [rm | remove] <platform>: This removes a platform which was previously added to the project.

  • platform [ls | list]: This lists all platforms for which the project will build.

  • platform [up | update] <platform>: This...