pnpm init
创建一个 package.json 文件。
🌐 Create a package.json file.
选项
🌐 Options
--bare
新增于:v10.25.0
🌐 Added in: v10.25.0
创建一个仅包含必填字段的 package.json。
🌐 Creates a package.json with only the required fields.
--init-type <type>
- 默认:模块
- 类型:commonjs、module
设置包的模块系统。
🌐 Set the module system for the package.
--init-package-manager
通过在 package.json 中添加 “packageManager” 字段,将项目固定到当前的 pnpm 版本。
🌐 Pin the project to the current pnpm version by adding a "packageManager" field to package.json.