Coder Social home page Coder Social logo

mini-nrm's Introduction

mini-nrm

Mini npm registry manager

Version visitor_badge MIT License

mini-nrm

Super lightweight npm registry manager

  • No dependencies.
  • mini-nrm ~ 21kB | nnrm ~ 7MB | nrm ~ 15MB
  • Customizing the registry image
  • Test response speed details
  • TypeScript type declarations included.

Install

npm install -g mini-nrm

Because it is very slim, you can use npx to manage the registry image directly without installing it

npx mini-nrm --help

Usage

This command does not modify the registry, it just uses the specified registry to install the dependencies

It uses the taobao registry to install output-line get-user-ip body-data simple-unique

-npm install output-line get-user-ip body-data simple-unique -S
+mnrm use taobao output-line get-user-ip body-data simple-unique -S

mnrm --help: Show this help

  Usage
    $ mnrm [options]
  Options
    ls, list                            List all the registries
    use <name> [package...]             Switch registry or specify registry directly to install npm packages
    add <name> <registry> [home]        Add a custom registry
    test [-i, --info]                   Test the response time of all registries
    del, delete, rm, remove <name...>   Remove a custom registry
    h, -h, help, --help                 Show this help
  Examples

    $ mnrm add npm https://registry.npmjs.org/

    $ mnrm use npm

    $ mnrm use taobao output-line get-user-ip body-data simple-unique -S

    $ mnrm list

      * npm --------- https://registry.npmjs.org/
        yarn -------- https://registry.yarnpkg.com/
        taobao ------ https://registry.npmmirror.com/
        tencent ----- https://mirrors.cloud.tencent.com/npm/
        npmMirror --- https://skimdb.npmjs.com/registry/

    $ mnrm test

      * npm --------- 153 ms
        yarn -------- 175 ms
        taobao ------ 519 ms
        tencent ----- 121 ms
        npmMirror --- 481 ms

JavaScript API

import mnrm from 'mini-nrm'

console.log(mnrm.list())
// output
// * npm --------- https://registry.npmjs.org/
//   yarn -------- https://registry.yarnpkg.com/
//   taobao ------ https://registry.npmmirror.com/
//   tencent ----- https://mirrors.cloud.tencent.com/npm/
//   npmMirror --- https://skimdb.npmjs.com/registry/
//   github ------ https://npm.pkg.github.com/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.