code: function stream2Promise(stream) {
  	return new Promise(function(resolve, reject) {
  		stream.on('finish', resolve)
  		      //https://github.com/sindresorhus/gulp-size/issues/13
  			  .on('end', resolve)
  			  .on('error', reject);
  	});
  }
docs: https://github.com/cssmagic/gulp-stream-to-promise/blob/master/index.js