npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-to-phonegap-build

v1.6.3

Published

Create PhoneGap Build package from Cordova project and upload it on PhoneGap Build platform

Downloads

20

Readme

This script takes a Cordova 5+ project folder and create a Phonegap Build compliant .zip file and upload it to Phonegap Build. Really useful into a Continuos Integration build system.

Installation:

npm install -g cordova-to-phonegap-build

Usage:

Inside NodeJS applications

You can import this script inside your NodeJS application:

First you need it installed locally: npm install cordova-to-phonegap-build

then you can invoke it within you application

const cdvPgb = require('cordova-to-phonegap-build')

cdvPgb.upload(process.cwd(), '$yourPhonegapToken', 'resources')

Using shell command

Script needs the Phonegap Token loaded as Enviromental Variable in order to connect to Phonegap Build, you can retrieve it into Account settings on Phonegap Build site.

export PGToken="$yourPhonegapToken" tobuild $cordovaProjectDirectory -f resources

The script creates a .zip file to upload to PhoneGap: Build with "config.xml" and the "www" folder

Parameters:

-x/--xml

Load the config.xml from a different location and override the one on main folder.

-f/--folder folderName

Indicate any other folder to be added to the uploaded file. Required if you use splash/icons external resources folder. Could be used more times as needed. folderName is relative to the project path.

i.e.: tobuild --folder resources --folder fonts

-t/--token $yourPhonegapToken

You could use your token as params instead of environment variable.
Token could be obtained also from NPM config.

i.e.: npm config set pgToken "$yourPhonegapToken" will save it in you ~/.npmrc and you do not need to use in your command or you can save it in your npm package.json config

"config": {
  "token": "$yourPhonegapToken"
}

-c/--check-version

Before update the app on PG:B a version check is made: if the version of the uploaded is less or equals than the existing one than an exception is throwed.

-l/--lookup

Keeps process running after upload to look at the current status of the build for every platforms.

-d/--download

After a build succeed it starts to download into current folder

-p/--path

Defines a path where to download the build

-o/--timeout

Specifies the max amount of minutes to wait for download or lookup. Defaults to 10, if reached exits with an error.

Key Management

Keys options are supposed to be defined inside package.json config prop in that form:

"config": {
  "keys": {
    "android": {
      "name": "Foo",
      "password": "keyBar",
    },
    "ios": {
      "name": "Faa",
      "password": "bor",
    }
  }
}

Keys can also be defined by CLI params that override package.json entries.

--key-android

--key-ios

Key name of Android and ios key on Phonegap:Build. It could also be defined as NPM config.

--key-android-pwd

--key-ios-pwd

Password for keystore of the Android keystore and iOS certificate.