Yarn 2 plugin for generating lambda zip archives from yarn 2 projects
yarn plugin import https://github.com/DBoroujerdi/yarn-plugin-serverless-packer/releases/download/0.0.2/plugin-serverless-packer.js
- Create a zip from the active workspace
yarn packageLambda
This will generate a lambda.zip
file in the root of the workspace
- Define a different name of the output zip
yarn packageLambda --out output.zip
- Package lambda source that was compiled with Typescript
yarn packageLambda --out lambda.zip --src-dir dist/
- Only package the dependencies in the zip - useful for layers only containing node_modules
yarn packageLambda --deps-only --out layer.zip
- Use with yarn workspaces
yarn workspace child-package run packageLambda