Langsung ke konten utama
Versi: Selanjutnya

pnpm config

Alias: c

Kelola file konfigurasi.

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.

File konfigurasi global terletak di salah satu lokasi berikut:

  • Jika variabel $XDG_CONFIG_HOME env diatur, maka $XDG_CONFIG_HOME/pnpm/rc
  • Di Windows: ~/AppData/Local/pnpm/config/rc
  • Di macOS: ~/Library/Preferences/pnpm/rc
  • Di Linux: ~/.config/pnpm/rc

Perintah

set <key> <value>

Memberikan nilai kepada key sesuai dengan value yang diberikan.

get <key>

Mengambil value dari key yang disediakan.

delete <key>

Menghapus key dari berkas konfigurasi.

list

Tampilkan semua pengaturan konfigurasi.

Opsional

--global, -g

Atur konfigurasi pada fail konfigurasi global.

--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.

Saat mengatur ke global<code>, kinerjanya sama dengan pengaturan pilihan <code>--global.

--json

Tampilkan semua pengaturan konfigurasi ke dalam format JSON.