Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 960 Bytes

README.md

File metadata and controls

32 lines (26 loc) · 960 Bytes

dotnpmrc

CI Maintainability Test Coverage

.npmrc formatter

Usage

import {formatNpmrc} from 'dotnpmrc'

const contents = formatNpmrc({
  format: 'npm9',
  scopes: {
    example: {
      registry: 'https://npm-registry.example.com/',
      auth: 'base64-of-username-and-password',
      authToken: 'npmToken.bearer',
      alwaysAuth: true,
    }
  },
  root: {
    registry: 'https://registry.yarnpkg.com'
  }
})

await fs.writeFile('.npmrc', contents, {encoding: 'utf8'})

License

MIT