メインコンテンツまでスキップ
Version: Next

pnpm config

エイリアス: c

設定ファイルを管理します。

The configuration files are in INI (the global) and YAML (the local) formats.

The local configuration file is located in the root of the project and is named pnpm-workspace.yaml.

グローバル設定ファイルは以下のいずれかの場所にあります。

  • $XDG_CONFIG_HOME 環境変数が設定されている場合、 $XDG_CONFIG_HOME/pnpm/rc
  • Windowsの場合: ~/AppData/Local/pnpm/config/rc
  • macOSの場合: ~/Library/Preferences/pnpm/rc
  • Linuxの場合: ~/.config/pnpm/rc

コマンド

set <key> <value>

設定キーを指定された値に設定します。

get <key>

指定されたキーの設定値を表示します。

delete <key>

設定ファイルから設定キーを削除します。

list

すべての設定を表示します。

オプション

--global, -g

グローバル設定ファイル内の設定を設定します。

--location

When set to project, the .npmrc file at the nearest package.json will be used. If no .npmrc file is present in the directory, the setting will be written to a pnpm-workspace.yaml file.

global に設定すると、パフォーマンスは --global オプションを設定した場合と同じになります。

--json

すべての構成設定を JSON 形式で表示します。