Skip to content

rexxars/print-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

print-registry

Print the configured npm registry URL for a given scope to terminal. A thin CLI wrapper around registry-url by Sindre Sorhus.

Usage

$ print-registry --help

  Print the configured npm registry URL for a given scope

  Usage
    $ print-registry <scope>

   Options
     --json     Output registry info as a JSON object
     --help, -h Show this help text

  Examples
    $ print-registry
    https://registry.npmjs.org/

    $ print-registry @myco
    https://npm.myco.com/

    $ print-registry --json
    {"url":"https://registry.npmjs.org/"}

# .npmrc
registry = 'https://custom-registry.com/'
npx print-registry
# output: 'https://custom-registry.com/'

It can also retrieve the registry URL associated with an npm scope.

# .npmrc
@myco:registry = 'https://custom-registry.com/'
npx print-registry @myco
# output: 'https://custom-registry.com/'

If the provided scope is not in the user's .npmrc file, then print-registry will check for the existence of registry, or if that's not set, fallback to the default npm registry.

License

MIT © Espen Hovlandsdal

About

CLI tool that prints information on the configured npm registry to the terminal

Resources

License

Stars

Watchers

Forks

Packages

No packages published