0.1.5 • Published 7 years ago
pack-deps v0.1.5
pack-deps
Pack dependencies.
Installation
npm i pack-depsAPI
packDeps(options, callback)
Generate a zip file that contains dependencies from a specified package.json.
options.pkgJsonpackage.jsonthat dependencies are packed.
options.pkgDir- A path that the
package.jsonis located.
- A path that the
options.production- A boolean value whether to pack dependencies in production mode.
options.cacheBaseDir- A path of a base directory that cache a packed package on.
options.baseDirInZip- A path of a base directory in a zip file.
options.noCache- If this option is
false, a zip file is not generated.
- If this option is
callback(err, { zip, cacheFile, cacheDir })- A function that is callback when packing is completed.
err- An Error object when an error is occured.zip- An instance of the JSZip.cacheFile- A path of the cached zip file.cacheDir- A path of a directory that cache the packed package on.
depsThumbprint(options)
Calculate a thumbprint based on dependeices from a specified package.json.
options.pkgJsonoptions.pkgDir
Return value:
resolvedPkgJsonthumbprint
License
MIT