docs: function publishToS3(bucket, simulate, force) {
  
    if (force) {
      rimraf.sync('./.awspublish-*');
    }
  
    // Config object is passed to
    // new AWS.S3() as documented here:
    //   http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property
  
    var publisher = createPublisher(bucket);
  
    console.log(`Publishing to ${bucket}`)
  
    // We want to construct a pipeline that consists of multiple segments piped together.
    // The consumer of this pipeline needs to be able to pipe into its first segment
    // and to maybe continue it, i.e. to access its last segment. So we're returning
    // an array with the first and last segments of this pipeline.
  
    var first = publisher.publish({}, {
      force: force,
      simulate: simulate === true ? true : false
    })
    var cache = null
    if (!force) {
      cache = first.pipe(publisher.cache())
    }
    var last = (cache || first).pipe(awspublish.reporter())
    return [first, last]
  
  }