GithubHelp home page GithubHelp logo

bradparks / phonegap-3-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cemerson/phonegap-3-boilerplate

0.0 2.0 0.0 3.54 MB

My humble stab at setting up and maintaining a bare bones PhoneGap 3.x project structure with the plugins* I normally use (*official plugins and others I've modified myself)

phonegap-3-boilerplate's Introduction

PhoneGap-3-Boilerplate

#Overview Here's my humble stab at setting up and maintaining a bare bones PhoneGap 3.x project structure with the plugins* I normally use (*official plugins and others I've modified myself).

This will likely be a WIP for a while - but the main thing in the initial version I wanted to get finished/released asap was getting the main plugins I normally use working with CDV 3.0 and in a 'ready-to-use' form. At the time I'm writing this up some of the plugins used are indeed CDV 3.0 compatible - but others are not (including important ones like how I need to view URLs and PDFs). Long story short is that this project contains a bare bones CDV 3.0 app project root folder structure that includes the following plugins and some test methods (js/tests.js):

#Video: See a quick video run-through of the PhoneGap 3 Boilerplate (in iOS Simulator) here:

ScreenShot

###Official Plugins (plugins I didn't have to alter myself - all came directly from latest git repos maintained by the Cordova team)

###CE-Altered Plugins (The original authors of these may/may not update these eventually - but my copies are working in CDV 3.0 today)

#Plugin Notes

All the plugins listed above work as normal so nothing really to explain outside the usage shown in the js/tests.js file. Adding/removing the latest version of each plugin requires using the Cordova CLI. The only thing that is worth mentioning here is a few things around the InAppBrowser plugin being used.

InAppBrowser is an official Cordova-maintained plugin and is currently CDV 3.0 compatible However it currently doesn't allow "windowed" mode as my previous versions of ChildBrowser did so I've taken the latest version and modified it to take some additional parameters to allow the specification of width, height, xpos and ypos. Example usage/etc can be seen in the js/tests.js or at the git page (https://github.com/cemerson/cordova-inappbrowser-ce). I also threw in the ability to provide a button background color as a parameter if the default blue doesn't match the app's skin - syntax also shown on the git page.

#Usage

Please Note that setting up a new PhoneGap 3 Boilerplate folder per the below Terminal commands will nuke any files you have there already - so it's best to start with a new directory and move any existing files you need in after setting everything up.

Make sure cordova 3 is installed first (instructions here).

To grab a copy of the PhoneGap 3 Boilerplate (on OSX) jump to Terminal and change to whatever directory you want to place your project and type the following ("MyFolder" being what the local destination folder should be named):

cordova create PG3BP
cd PG3BP
git clone https://github.com/cemerson/PhoneGap-3-Boilerplate.git tmp && mv tmp/.git . && rm -rf tmp && git reset --hard

To take a look at things now you can type the following to confirm the PhoneGap 3 Boilerplate plugins are indeed there and that no platforms are setup yet for the project:

cordova plugins ls
cordova platforms ls

Next step to add an iOS project type the following:

cordova platform add ios

At this point a Xcode project has been setup so you can test/build that when ready. From this point on, modify and test the files in the PG3BP/www folder and when you want to refresh the iOS build return to the Terminal (in "PG3BP" folder) and type:

cordova build

This will push your PG3BP/www changes down to the iOS build and actually test the Xcode build via command line.

phonegap-3-boilerplate's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.