exec-pod

    1.0.0 • Public • Published

    exec-pod

    NPM version Build Status Coverage Status Dependency Status devDependency Status

    Run a pod subcommand and buffer the output like child_process#execFile does

    const execPod = require('exec-pod');
     
    execPod('search', ['AWS']).then(output => {
      output; //=> '-> AWSAPIGateway (2.2.7)\n   Amazon Web Services SDK for iOS ...'
    });

    Installation

    Use npm:

    npm install exec-pod
    

    and make sure CocoaPods is installed.

    API

    const execPod = require('exec-pod');

    execPod(subcommand [, args, options])

    subcommand: String (one of the pod subcommands to run, e.g. install)
    args: Array of strings (arguments passed to the command)
    options: Object
    Return: Promise instance

    It runs the given pod subcommand and returns a Promise instance.

    When the command finishes successfilly, it will be fulfilled with the command output.

    When it fails to run the command or the command itself fails, it will be rejected with an error.

    execPod('install', ['AFNetworking'], {bundleExec: true}).then(output => {
      output; //=> 'Updating spec repo `master` ... '
    });

    Options

    All child_process#execFile options and bundleExec option (described below) 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

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar