📚 Cheatsheet

Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.

Snippets 8

Retour
Fichier .npmrc pour l'authentification
Avancé
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
NPM - Configurer le registre par défaut
Facile
npm config set registry https://registry.npmjs.org/
NPM - Se connecter à un registre
Facile
npm login
NPM - Utiliser un registre pour un scope spécifique
Intermédiaire
npm config set @mon-scope:registry http://mon-registre.interne
Yarn - Configurer le registre par défaut (.yarnrc.yml)
Facile
npmRegistryServer: "https://registry.yarnpkg.com"
Yarn - Fichier .yarnrc.yml pour l'authentification
Avancé
npmRegistries:
  "//registry.npmjs.org":
    npmAuthToken: "${NPM_TOKEN}"
Yarn - Se connecter à un registre
Facile
yarn npm login
Yarn - Utiliser un registre pour un scope spécifique
Intermédiaire
npmScopes:
  mon-scope:
    npmRegistryServer: "http://mon-registre.interne"