LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

npm-pack

creates a tarball of a package exactly as it would be published

TLDR

Pack current package
$ npm pack
copy
Pack specific package
$ npm pack [package]
copy
Pack without gzip
$ npm pack --pack-destination [./dist]
copy
Dry run (list contents)
$ npm pack --dry-run
copy
Output as JSON
$ npm pack --json
copy

SYNOPSIS

npm pack [options] [packages...]

DESCRIPTION

npm pack creates a tarball of a package exactly as it would be published. This is useful for testing what will be included in a published package.The tarball can be installed locally to test the package.

PARAMETERS

--dry-run

Show contents without packing.
--json
Output as JSON.
--pack-destination dir
Output directory.
--workspace ws
Pack specific workspace.

WORKFLOW

$ # Create tarball
npm pack
# Creates package-1.0.0.tgz

# Test installation
npm install ./package-1.0.0.tgz

# Check contents without creating file
npm pack --dry-run
copy

FILES INCLUDED

$ - Files in package.json "files"
- package.json
- README
- LICENSE
- CHANGELOG
Excluded by .npmignore
copy

INSTALL

sudo pacman -S npm
copy
sudo apk add npm
copy
brew install npm
copy

CAVEATS

Different from npm publish. Respects .npmignore and files field. Useful for pre-publish testing.

HISTORY

npm pack was added to allow developers to test package contents before publishing to the registry.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid