Home

cordova-utils

Build Status NPM Version NPM Downloads JavaScript Style Guide

A set of basic utilities for Apache Cordova apps.

Installing

npm install -g cordova-utils

# or if you just want to use it locally
npx cordova-utils version -v 1.4.5 -b 445

Note: For a global install of -g cordova-utils, OSX/Linux users may need to prefix the command with sudo or can setup proper file permissions on OSX for npm to install without sudo.

Usage:

Command Line

cordova-utils version [options] -v <version> -b <build>

Example:

cordova-utils version -v 1.4.5 -b 445

Library

Example:

// CJS
const CordovaUtils = require('cordova-utils')
// or MJS
import CordovaUtils from 'cordova-utils'


const cordovaUtils = new CordovaUtils()

cordovaUtils
  .setVersion(version, build, configFile)
  .then(res => {
    // do something
  })
  .catch(err => {
    // handle error
  })