generate a tarball from the active workspace
yarn packExamples
Section titled “Examples”Create an archive from the active workspace :
yarn packList the files that would be made part of the workspace’s archive :
yarn pack --dry-runName and output the archive in a dedicated folder :
yarn pack --out /artifacts/%s-%v.tgzDetails
Section titled “Details”This command will turn the active workspace into a compressed archive suitable
for publishing. The archive will by default be stored at the root of the
workspace (package.tgz).
If the -o,--out is set the archive will be created at the specified path. The
%s and %v variables can be used within the path and will be respectively
replaced by the package name and version.
Options
Section titled “Options”| Definition | Description |
|---|---|
| Run a preliminary yarn install if the package contains build scripts |
| Print the file paths without actually generating the package archive |
| Format the output as an NDJSON stream |
| Create the archive at the specified path |