Langsung ke konten utama
Versi: 8.x

pnpm config

Alias: c

Kelola file konfigurasi.

File konfigurasi dalam format INI.

File konfigurasi lokal terletak di root proyek dan diberi nama .npmrc.

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.

Options

--global, -g

Set the configuration in the global config file.

--location

When set to project, the .npmrc file at the nearest package.json will be used.

When set to global, the performance is the same as setting the --global option.

--json

Show all the config settings in JSON format.