UNPKG

build-a-npm

Version:

A tool to create and publish Node packages with automatic version bumping and GitHub integration.

14 lines (12 loc) 339 B
function generateNpmrc(githubUsername, githubRepoToken) { if ( !githubUsername || !githubRepoToken || githubRepoToken.toLowerCase() === 'na' ) { return ''; } return `//npm.pkg.github.com/:_authToken=${githubRepoToken} @${githubUsername}:registry=https://npm.pkg.github.com/`; } module.exports = { generateNpmrc };