NPM-PACK(3)
π NPM-PACK(3) π
okay so bestie, welcome to the npm-pack page from the npm manual β yes that npm, the one in your node_modules that weighs more than your feelings π. This is the lowkey iconic one that makes tarballs. let's get into it β¨
β¨ NAME β¨
npm-pack β create a tarball from a package π
π¦ SYNOPSIS π¦
npm.commands.pack([packages,] callback)
that's it. that's the whole vibe check. packages is optional, callback is not π
πΈ DESCRIPTION πΈ
okay so here's the tea β β for anything that's installable, this command will scoop it up and handle it. and when I say anything, I mean anything, bestie:
- a package folder π
- a tarball ποΈ
- a tarball url π
name@tagπ·οΈname@versionπ’- or just a plain
nameβ¨
it fetches it to the cache first (yes, the cache, we love a shortcut π
), then copies the tarball to the current working directory as <name>-<version>.tgz, and then writes the filenames out to stdout. so you literally get receipts π§Ύ periodt.
π heads up bestie: if the same package is specified multiple times, then the file will be overwritten the second time. no cap, it just goes poof and gets replaced. don't come crying to me about it π
and if no arguments are supplied at all? then npm packs the current package folder. main character energy fr fr β it just packs you π«Ά
β¨ that's the whole page β¨ β this little gem is from March 2017, living in the NPM-PACK(3) manual section. go forth and tarball responsibly, ily, bye πππ¦
π¦ where this page comes from
- nixos 26.05: hueadm 1.2.1
- nixpkgs unstable: hueadm 1.2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms