Skip to content

DBoroujerdi/yarn-plugin-serverless-packer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yarn-plugin-serverless-packer

Yarn 2 plugin for generating lambda zip archives from yarn 2 projects

Getting Started

yarn plugin import https://github.com/DBoroujerdi/yarn-plugin-serverless-packer/releases/download/0.0.2/plugin-serverless-packer.js

Examples

  1. Create a zip from the active workspace
yarn packageLambda

This will generate a lambda.zip file in the root of the workspace

  1. Define a different name of the output zip
yarn packageLambda --out output.zip
  1. Package lambda source that was compiled with Typescript
yarn packageLambda --out lambda.zip --src-dir dist/
  1. Only package the dependencies in the zip - useful for layers only containing node_modules
yarn packageLambda --deps-only --out layer.zip
  1. Use with yarn workspaces
yarn workspace child-package run packageLambda