lib/clean.js
function cleanup() {
  const artifacts = ['.requirements'];
  if (this.options.zip) {
    if (this.serverless.service.package.individually) {
      this.targetFuncs.forEach(f => {
        artifacts.push(path.join(f.module, '.requirements.zip'));
        artifacts.push(path.join(f.module, 'unzip_requirements.py'));
      });
    } else {
      artifacts.push('.requirements.zip');
      artifacts.push('unzip_requirements.py');
    }
  }

  return BbPromise.all(
    artifacts.map(artifact =>
      fse.removeAsync(path.join(this.servicePath, artifact))
    )
  );
}
function cleanup() {
  const artifacts = ['.requirements'];
  if (this.options.zip) {
    if (this.serverless.service.package.individually) {
      this.targetFuncs.forEach(f => {
        artifacts.push(path.join(f.module, '.requirements.zip'));
        artifacts.push(path.join(f.module, 'unzip_requirements.py'));
      });
    } else {
      artifacts.push('.requirements.zip');
      artifacts.push('unzip_requirements.py');
    }
  }

  return BbPromise.all(
    artifacts.map(artifact =>
      fse.removeAsync(path.join(this.servicePath, artifact))
    )
  );
}
function cleanup ( ) { const artifacts = [ '.requirements' ] ; if ( this . options . zip ) { if ( this . serverless . service . package . individually ) { this . targetFuncs . forEach ( f => { artifacts . push ( path . join ( f . module , '.requirements.zip' ) ) ; artifacts . push ( path . join ( f . module , 'unzip_requirements.py' ) ) ; } ) ; } else { artifacts . push ( '.requirements.zip' ) ; artifacts . push ( 'unzip_requirements.py' ) ; } } return BbPromise . all ( artifacts . map ( artifact => fse . removeAsync ( path . join ( this . servicePath , artifact ) ) ) ) ; }
clean up .requirements and .requirements.zip and unzip_requirements.py
@return {Promise}
clean up . requirements and . requirements . zip and unzip_requirements . py