lib/layer.js
function zipRequirements() {
  const rootZip = new JSZip();
  const src = path.join('.serverless', 'requirements');
  const runtimepath = 'python';

  return addTree(rootZip.folder(runtimepath), src).then(() =>
    writeZip(rootZip, path.join('.serverless', 'pythonRequirements.zip'))
  );
}
function zipRequirements() {
  const rootZip = new JSZip();
  const src = path.join('.serverless', 'requirements');
  const runtimepath = 'python';

  return addTree(rootZip.folder(runtimepath), src).then(() =>
    writeZip(rootZip, path.join('.serverless', 'pythonRequirements.zip'))
  );
}
function zipRequirements ( ) { const rootZip = new JSZip ( ) ; const src = path . join ( '.serverless' , 'requirements' ) ; const runtimepath = 'python' ; return addTree ( rootZip . folder ( runtimepath ) , src ) . then ( ( ) => writeZip ( rootZip , path . join ( '.serverless' , 'pythonRequirements.zip' ) ) ) ; }
Zip up requirements to be used as layer package.
@return {Promise} the JSZip object constructed.
Zip up requirements to be used as layer package .