A few days ago the PhoneGap team announced an update to the CLI: PhoneGap CLI 5.0.0 Released!. To be honest, I don’t typically make use of the PhoneGap CLI as I mostly use either Cordova or Ionic. However, I missed an earlier update that I think is pretty cool (and it is one I was able to help out with) - template support.
When creating a PhoneGap project, you can request a template to be used instead of the default PhoneGap project. You’ve been able to copy from a directory for a while now (using –copy-from or –link-to), but this new feature lets you specify from a set of templates that might be useful for seeding a new project.
To see what templates exist, you execute:
phonegap template list (you can also replace
There are only four templates so far, but more will be coming in the future. I’ve said before that I’m not a fan of the default template used by both Cordova and PhoneGap, so I’m happy to see
blank as an option. The jQuery Mobile template is one I built. To use a template, you simply use
--template name when creating your application.