How to use the cordova-lib.cordova.raw function in cordova-lib

To help you get started, we’ve selected a few cordova-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github combine / universal-react-redux / scripts / cordova / build.js View on Github external
};

  // Check if config file exists, if not warn the user.
  if (config) {
    try {
      fs.accessSync(configFile, fs.F_OK);
    } catch (e) {
      console.log('Warning: build file not found, using defaults...');
    }
  }

  // switch to cordova directory
  process.chdir('./cordova');

  // build with options and distribute to Fabric if specified
  return cordova.raw.build(buildOpts).then(
    function() {
      if (distribute) {
        fabric.distribute(platforms, target);
      }
    },
    function(error) {
      console.log('Build failed:', error);
    }
  );
};
github MobileChromeApps / mobile-chrome-apps / src / cordova-commands.js View on Github external
var msg = cmd[0];
  cmd.slice(1).forEach(function(arg) {
    if (Array.isArray(arg)) {
      msg += ' ' + arg.join(' ');
      return;
    } else if (typeof arg != 'string') {
      return;
    }
    if (arg.indexOf(' ') != -1) {
      msg += ' "' + arg + '"';
    } else {
      msg += ' ' + arg;
    }
  });
  console.log('## Running Cordova Command: ' + msg);
  return cordova.raw[cmd[0]].apply(cordova, cmd.slice(1))
  .fail(function(err) {
    if (err.name == 'CordovaError') {
        return Q.reject(err.message);
    } else {
        return Q.reject(err.stack);
    }
  });
};
github jolocom / smartwallet-app / gulpfile.js View on Github external
.then(function() {
      return cordova.raw.platforms('add', 'ios');
    })
    .then(function() {
github Festify / app / gulpfile.js View on Github external
}, function(err, result) {
        if(err){
            return cb(err);
        }
        cordova.raw.build({
            platforms: ['android'],
            options: {
                release: true,
                argv: [
                    "--keystore", "../android-sign/upload.keystore",
                    "--alias", "upload",
                    "--storePassword", result.password,
                    "--password", result.password
                ]
            }
        }).done(cb);
    });
});
github jolocom / smartwallet-app / gulpfile.js View on Github external
.then(function() {
      return cordova.raw.build({
        'platforms': ['ios'],
        'options': [
          '--release',
          '--gradleArg=--no-daemon',
          '--buildConfig=' + config + '.json'
        ]
      });
    })
    .then(function() {