npm-login-promise
npm login programmatic API that returns a promise
Install
npm i --save npm-login-promise
Example Usage
Logging in to the NPM registry:
import npmLoginPromise from 'npm-login-promise';
const username = 'testUser';
const password = 'testPass';
const email = 'test@example.com';
npmLoginPromise(username, password, email);
Logging in to private NPM registries:
import npmLoginPromise from 'npm-login-promise';
const username = 'testUser';
const password = 'testPass';
const email = 'test@example.com';
const registry = 'https://npm.example.com';
const scope = '@myScope';
const configPath: './custom/path';
npmLoginPromise(username, password, email, registry, scope, configPath);
Development
This module uses semantic-release to auto-magically release and update the version in package.json
based on semver as well as update release notes. Unknown commit types will not trigger a release. Semantic tags and their corresponding release types are below.
Tag | Release Type |
---|---|
breaking | Major |
feat | Minor |
chore, fix, refactor, revert | Patch |
doc, test | No release |