Npm pack for Lambda
npm install npm-lambda-packnpm pack for Lambda.
```
npm i npm-lambda-pack
` javascript
const { pack } = require('npm-lambda-pack');
pack({
pkgJson: require('path/to/lambda/package.json'),
pkgDir: 'path/to/lambda',
}), (err, esult) => {
// ...
});
`
- options.pkgJsonpackage.json
- that dependencies are packed.options.pkgDir
- package.json
- A path that the is located.options.cacheBaseDir
- options.exclude
- A path of a base directory that cache a packed package on.
- callback(err, result)
- A glob pattern of files that are not add into the zip file.
- err
- A function that is callback when packing is completed.
- - An Error object when an error is occured.result.zip` - An instance of the JSZip.
-
MIT