Passa al contenuto principale
Versione: Prossimo

pnpm config

Alias: c

Gestisci i file di configurazione.

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.

Il file di configurazione globale si trova in una delle seguenti posizioni:

  • Se la variabile env $XDG_CONFIG_HOME è impostata, allora $XDG_CONFIG_HOME/pnpm/rc
  • Su Windows: ~/AppData/Local/pnpm/config/rc
  • Su macOS: ~/Library/Preferences/pnpm/rc
  • Su Linux: ~/.config/pnpm/rc

Comandi

set <key> <value>

Imposta la chiave di configurazione sul valore fornito.

get <key>

Stampa il valore di configurazione per la chiave fornita.

delete <key>

Rimuove la chiave di configurazione dal file di configurazione.

list

Mostra tutte le impostazioni di configurazione.

Opzioni

--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. If no .npmrc file is present in the directory, the setting will be written to a pnpm-workspace.yaml file.

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

--json

Show all the config settings in JSON format.