henhal / serverless-plugin-layer-manager

Plugin for the Serverless framework that offers improved AWS Lambda layer management
MIT License
12 stars 8 forks source link

Allow for yarn or npm installations #10

Closed iamdavidmartin closed 1 year ago

iamdavidmartin commented 3 years ago

Hello again,

Right now this plugin always uses npm to install dependencies. However, when using yarn workspaces in a monorepo, yarn install must be run. When npm install is run in this situation, it removes packages it should not which causes packages not to be found during runtime. The npm output looks like

added 222 packages from 195 contributors, removed 228 packages, updated 95 packages and audited 319 packages in 15.276s

So I added a packager option to the custom section with a default value of npm so exiting users don't notice any changes. I also updated the README.

Hope you like it!