@ambassify/set-npmrc

Configures npm authentication token for private tokens

Usage no npm install needed!

<script type="module">
  import ambassifySetNpmrc from 'https://cdn.skypack.dev/@ambassify/set-npmrc';
</script>

README

@ambassify/set-npmrc

This script searches for .npmrc files in the current working directory and appends authentication to it.

Usage

  • A .npmrc file must already be present
  • An NPM_TOKEN environment variable must be set
  • A custom registry can be passed as the first argument, e.g. npm.ambassify.eu. If not set, it will check for an NPM_REGISTRY environment variable or default to registry.npmjs.org if it isn't present.
npx @ambassify/set-npmrc [registry]