0.2.8 • Published 6 years ago
repack-zip v0.2.8
This package creates a .zip file containing your package and its dependencies, including transitive dependencies.
The code was forked from node-pack-zip which did not support transitive dependencies (see issue#2).
It was mainly designed to help deploy nodejs packages in AWS lambdas.
The .zip file will contain
- All files not in
node_modules - All files in
node_modulesthat are part of a package listed in thedependenciesfield of yourpackage.jsonand all their transitives dependencies - Files may be excluded by adding glob patterns to
.packignore
Installation
npm install --save-dev repack-zip
Example
my-lambda is an npm package I want to run as an AWS Lambda Function.
Install repack-zip locally in my-lambda
npm install --save-dev repack-zipInstall any runtime dependencies of my-lambda.
npm installModify my-lambda/package.json:
"scripts": {
"build-aws-lambda": "repack-zip"
...
}Create the .zip file containing my-lambda and all its dependencies, ready to be uploaded to AWS Lambda
npm run build-aws-lambdaRelease notes
0.2.5 - Added support for root module _phantomChildren dependencies. 0.2.4 - Initial published release