0.1.6 • Published 7 years ago
npm-lambda-pack v0.1.6
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