Перейти до основного змісту
Версія: Next

pnpm init

Створити package.json файл.

Параметри

--bare

Додано у: v10.25.0

Створює package.json тільки з обов'язковими полями.

--init-type <type>

  • Стандартно: module
  • Тип: commonjs, module

Встановлює систему модулів для пакунка.

--init-package-manager

Pin the project to the current pnpm version.

Since v11, the pin is written as a devEngines.packageManager entry (instead of the legacy packageManager field), so version ranges are supported and the resolved version is captured in pnpm-lock.yaml.

Inside a workspace subpackage this flag has no effect — the devEngines.packageManager field is only added to the workspace root's package.json.