NPM.Packager (NPM v0.6.0)

Copy Markdown View Source

Create tarballs for npm publishing.

Reads package.json to determine which files to include, respecting the files field and .npmignore.

Summary

Functions

List files that would be included in a publish tarball.

Count of files to pack.

Calculate the total size of files to pack in bytes.

Functions

files_to_pack(dir \\ ".")

@spec files_to_pack(String.t()) :: [String.t()]

List files that would be included in a publish tarball.

pack_file_count(dir \\ ".")

@spec pack_file_count(String.t()) :: non_neg_integer()

Count of files to pack.

pack_size(dir \\ ".")

@spec pack_size(String.t()) :: non_neg_integer()

Calculate the total size of files to pack in bytes.