How do you check (and update) your PhoneGap version in 3.0?
Join the DZone community and get the full member experience.Join For Free
a tip of the rage wolf to fellow adobian brian leroux for his help with this blog post. and by help, i mean he basically explained it all to me and i'm just making it pretty.
one of the big changes to phonegap 3.0 is how you install it. previously, you would download a zip file, expand it, and have all the bits you need. now the installation process has you use npm (node package manager) to grab the bits.
i've been using node and npm for a while, but i'm definitely still a bit unsure of how it works. the question i had was, how would i be able to tell when a new version was released and how would i get my copy updated?
first, remember that the phonegap cli has a -v argument that tells you the current version you have installed:
currently, the phonegap site only mentions 3.0 and not anything more specific, so to compare your version to the latest in npm you would do "npm info phonegap version". this is demonstrated below:
in this case, my version is the same, but if i wanted to update it, i'd run: npm update -g phonegap . i always use sudo in front but you may not have to do that (especially on windows ;) ).
i hope this helps. tomorrow morning i'll be blogging about how plugins have changed.
Published at DZone with permission of Raymond Camden, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.