Creation and local development of PhoneGap

I am creating an application that will be packaged for different platforms using PhoneGap Build. Now my project structure is as follows:

+--- css +--- img +--- js +--- res +--- config.xml +--- icon.png \--- index.html 

This is a fairly standard PhoneGap starter project. I can upload this as a zip file to the PhoneGap build server and return the packages.

Now I am wondering how I can best do some local development (without creating via PhoneGap Build after each change); Should I create a โ€œregularโ€ PhoneGap project in a separate folder and put the files in my project assets (html, js, css, img)? This is a regular PhoneGap project that I can run, for example, Xcode.

I wonder if the best approach is higher or are there alternatives?

+4
source share
2 answers

They have a feature called hydration that can speed up the testing process, but you still have to go through the download and build phase. https://build.phonegap.com/docs/hydration

If you can leave without apis, then it is very easy to develop and test it locally, just by opening it in a local browser. This is faster than recompiling and deploying on a local simulator. If you only need a few APIs, you can consider removing apis. It also makes it easy to write automated tests for your code.

Another option is to use the chrom plugin for the phonegap emulator. http://emulate.phonegap.com/ This can mimic the phonegap apis function.

0
source

Have you tried one of them:

  • Chrome: If you don't need the PhoneGap APIs for your development, you can just use Chrome with the "Emulate touch events" enabled. I use this a lot because most of the time I work on CSS and JavaScript and therefore can use Chrome perfectly. Installing "Device Metric" is also a good helper.
  • iPhone Simulator:. If you are working on a Mac, you can use the iPhone Simulator and test your project using Safari.
  • Ripple Emulator: To emulate the PhoneGap API, you can use this emulator: http://emulate.phonegap.com/

While you are developing mostly simple HTML, CSS, and JavaScript, this setting can help you be more productive. I think this is what @simap meant with "development on localhost".

0
source

All Articles