pnpm pack
从包创建 tarball。
¥Create a tarball from a package.
选项
¥Options
--out <path>
自定义 tarball 的输出路径。使用 %s
和 %v
包含包名称和版本,例如 %s.tgz
或 some-dir/%s-%v.tgz
。默认情况下,tarball 以 <package-name>-<version>.tgz
的名称保存在当前工作目录中。
¥Customizes the output path for the tarball. Use %s
and %v
to include the package name and version, e.g., %s.tgz
or some-dir/%s-%v.tgz
. By default, the tarball is saved in the current working directory with the name <package-name>-<version>.tgz
.
--pack-destination <dir>
pnpm pack
将保存 tarball 的目录。默认为当前工作目录。
¥Directory in which pnpm pack
will save tarballs. The default is the current working directory.
--pack-gzip-level <level>
指定自定义压缩级别。
¥Specifying custom compression level.
--json
JSON 格式的日志输出。
¥Log output in JSON format.
生命周期脚本
¥Life Cycle Scripts
-
prepack
-
prepare
-
postpack