JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4836
  • Score
    100M100P100Q124165F
  • License Apache-2.0

Run npm pack to generate a .zip archive file

Package Exports

  • npm-pack-zip

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (npm-pack-zip) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

This package creates a .zip file containing your package and its dependencies.

It is designed to help you deploy NPM packages to AWS Lambda.

The .zip file will contain

  • All files not in node_modules
  • All files in node_modules that are part of a package listed in the dependencies field of your package.json
  • Files may be excluded by adding glob patterns to .packignore

Installation

npm install --save-dev pack-zip

Example

my-lambda is an npm package I want to run as an AWS Lambda Function.

Install pack-zip locally in my-lambda

npm install --save-dev pack-zip

Install any runtime dependencies of my-lambda.

npm install

Modify my-lambda/package.json:

"scripts": {
    "build-aws-resource": "pack-zip"
    ...
}

Create the .zip file containing my-lambda and its dependencies, ready to upload to AWS Lambda

npm run build-aws-resource