lib/setup.js
function setup (program) {
  return new Promise((resolve, reject) => {
    if (isSetupRequired(program)) {
      // If we're setup, merge the dotfile configuration into the program
      defaults(program, dotfile.get())
      logConfiguration(program)
      resolve()
    } else {
      // We're not setup, let's do that now
      askForDependencies(program)
        .then(() => wizardSetup(program))
        .then(() => logConfiguration(program))
        .then(() => resolve())
        .catch((e) => reject(e))
    }
  })
}
function setup (program) {
  return new Promise((resolve, reject) => {
    if (isSetupRequired(program)) {
      // If we're setup, merge the dotfile configuration into the program
      defaults(program, dotfile.get())
      logConfiguration(program)
      resolve()
    } else {
      // We're not setup, let's do that now
      askForDependencies(program)
        .then(() => wizardSetup(program))
        .then(() => logConfiguration(program))
        .then(() => resolve())
        .catch((e) => reject(e))
    }
  })
}
function setup ( program ) { return new Promise ( ( resolve , reject ) => { if ( isSetupRequired ( program ) ) { // If we're setup, merge the dotfile configuration into the program defaults ( program , dotfile . get ( ) ) logConfiguration ( program ) resolve ( ) } else { // We're not setup, let's do that now askForDependencies ( program ) . then ( ( ) => wizardSetup ( program ) ) . then ( ( ) => logConfiguration ( program ) ) . then ( ( ) => resolve ( ) ) . catch ( ( e ) => reject ( e ) ) } } ) }
Runs setup, checking if all configuration is existent,
and merging the dotfile with the program object

@param program - Commander program object
@returns {Promise} - Promsise that returns once setup completed
Runs setup checking if all configuration is existent and merging the dotfile with the program object