serverless-plugin-zip-symlinks-compress-harder

0.11.1 • Public • Published

Serverless plugin to improve artifact creation

This plugin for serverless will improve artifact creation. It uses some custom flags for Info-ZIP's command line to reduce artifact file size through:

  • Use the -9 compression flag for max compression
  • Use the -y flag to include symlinks as links not duplicates of the file
  • Use the -FS flag to ensure the latest version of a file is in the archive, and remove any file in the archive that isn't in the source directory any more

To use this plugin

  • yarn add serverless-plugin-zip-symlinks-compress-harder --dev or npm install --save-dev serverless-plugin-zip-symlinks-compress-harder
  • Add serverless-plugin-zip-symlinks-compress-harder to the plugins section of your serverless.yml
  • Add artifact: something.zip to the package section of your serverless.yml

eg:

...
package:
  exclude:
    - somefile.json
    - tests/**
    - package.json
    - serverless.yml

  artifact: my-lambda.zip

plugins:
  - serverless-plugin-zip-symlinks-compress-harder
...

Readme

Keywords

none

Package Sidebar

Install

npm i serverless-plugin-zip-symlinks-compress-harder

Weekly Downloads

76

Version

0.11.1

License

BSD-3-Clause-Clear

Unpacked Size

3.99 kB

Total Files

3

Last publish

Collaborators

  • hughescr