Miss any of our Open RFC calls?Watch the recordings here! »

exec-pod-callback

1.0.2 • Public • Published

exec-pod-callback

NPM version Build Status Coverage Status Dependency Status devDependency Status

Callback-style version of exec-pod:

Run a pod subcommand and buffer the output

const execPodCallback = require('exec-pod-callback');
 
execPodCallback('search', ['AWS'], (err, stdout, stderr) => {
  stdout; //=> '-> AWSAPIGateway (2.2.7)\n   Amazon Web Services SDK for iOS ...'
});

Installation

Use npm:

npm install exec-pod-callback

and make sure cocoapods is installed.

API

const execPodCallback = require('exec-pod-callback');

execPodCallback(subcommand [, args, options, cb])

subcommand: String (one of the pod subcommands to run e.g. install)
args: Array of strings (arguments passed to the command)
options: Object
cb: Function (callback function which takes three arguments: error, stdout, stderr)
Return: ChildProcess instance

It runs the given pod subcommand and passes buffered stdout/stderr values to the callback function.

execPodCallback('install', ['AFNetworking'], {bundleExec: true}, (err, stdout, stderr) => {
  if (err) {
    throw err;
  }
 
  stdout; //=> 'Updating spec repo `master` ... '
});

Options

All child_process#execFile options and bundleExec option are available.

options.bundleExec

Type: Boolean
Default: false

true runs the pod command with bundle exec, instead of using globally installed pod.

Related project

License

Copyright (c) 2015 Shinnosuke Watanabe

Licensed under the MIT License.

Install

npm i exec-pod-callback

DownloadsWeekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • avatar