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

Added possiblity to use npm install options via config #5

Open piotr-cz opened 4 years ago

piotr-cz commented 4 years ago

This adds a feature to set npm install options in config (see npm docs).

It may be used for example to minimize layer size or use different dependencies for development and production.

Example:

custom:
  layerConfig:
    installLayers: true
    installOptions:
    - --no-bin-links
    - --only=production

It's already possible set it up via the .npmrc file after #4, however this solution is more explicit and makes possible to set common options for all layers.