跳到主内容
版本:9.x

pnpm pack

从软件包中创建一个 tarball。

配置项

--out <path>

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 的目录。 默认值为当前目录。

--pack-gzip-level <level>

指定自定义压缩级别。

--json

添加于:v9.14.1

JSON 格式的日志输出。

生命周期

  • prepack
  • prepare
  • postpack