Docs/Reference/CLI/pack

yarn pack

Pack the project into a distributable archive

yarn pack

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.

#--dry-run, -nboolean

Print the file paths without actually generating the package archive

#--install-if-neededboolean

Run a preliminary yarn install if the package contains build scripts

#--preserve-workspacesboolean

Keep the workspace: protocols as-is in the generated archive

#--jsonboolean

Format the output as an NDJSON stream

#--outboolean

Create the archive at the specified path