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
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Related Plugin Resources
Index

The structure of a PhoneGap application


After creating a new project, as explained in the previous chapter, you'll see the following structure inside the project's root folder:

  • www: This directory contains the source files of the application and so we will be playing a lot in this directory. It contains the css, js, and img subdirectories, where you can place the respective files. Apart from assets such as CSS, JavaScript, and images, we will also have application-related HTML files.

  • merges: In this folder, you can add any platform-specific customization so you don't have to modify the source files every time you work with a project. For example, we can use this feature to use a different font style on Android devices only. The platforms that you want to override will have a specific folder similar to the www folder having its own CSS, JS, HTML, and image contents:

    merges/
    |-- ios/
    | '-- app.js
    |-- android/
    | '-- app.js
    www/
    '-- app.js

    In the preceding directory structure, the global application...