Package Exports
- npm-lambda-pack
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-lambda-pack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
npm-lambda-pack
npm pack for Lambda.
Installation
npm i npm-lambda-packUsage
const { pack } = require('npm-lambda-pack');
pack({
pkgJson: require('path/to/lambda/package.json'),
pkgDir: 'path/to/lambda',
}), (err, esult) => {
// ...
});pack(options, callback)
options.pkgJsonpackage.jsonthat dependencies are packed.
options.pkgDir- A path that the
package.jsonis located.
- A path that the
options.cacheBaseDir- A path of a base directory that cache a packed package on.
options.exclude- A glob pattern of files that are not add into the zip file.
callback(err, result)- A function that is callback when packing is completed.
err- An Error object when an error is occured.result.zip- An instance of the JSZip.
Related
License
MIT