serverless-plugin-zip-symlinks-compress-harder
v0.11.1
Published
A serverless plugin which will pack zip artifacts using "-9yFS" for better compression, removing old files, preserving symlinks
Downloads
176
Readme
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
-9compression flag for max compression - Use the
-yflag to include symlinks as links not duplicates of the file - Use the
-FSflag 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 --devornpm install --save-dev serverless-plugin-zip-symlinks-compress-harder- Add
serverless-plugin-zip-symlinks-compress-harderto thepluginssection of yourserverless.yml - Add
artifact: something.zipto thepackagesection of yourserverless.yml
eg:
...
package:
exclude:
- somefile.json
- tests/**
- package.json
- serverless.yml
artifact: my-lambda.zip
plugins:
- serverless-plugin-zip-symlinks-compress-harder
...