README_EN.md
July 19, 2024 ยท View on GitHub
README ๐ฆ
็ฎไฝไธญๆ | English
Bench
Comparison of npm mirror source tools speed
Usage
install
1. Module Installation
deno install --allow-read --allow-sys --allow-write --allow-env --allow-net -rfn dnrm https://deno.land/x/dnrm/mod.ts
If you have node installed but have not installed deno ๐
npx deno-npx install --allow-read --allow-write --allow-env --allow-net -rfn dnrm https://deno.land/x/dnrm/mod.ts
In some temporary scenarios where you don't want to install deno ๐
# Note: This usage is still slow because it takes time to load the deno shims
npm i deno-nrm -g
2. Local Installation
-
Download the project locally
-
Execute the command in the project root directory
deno task install
cli
# View current source
dnrm
# Switch taobao source
dnrm use taobao
# View all sources
dnrm ls
# Test all sources
dnrm test
# Set the source locally
dnrm use taobao --local
# View Help
dnrm -h
# View version
dnrm -V
Optimization Principle
- Hot Path Search
denohas a faster cold start thannode.- Automatically distinguish usage scenarios, parse parameters on demand, load low-frequency modules on demand, and set profiles on demand
- use regular configuration for
registryconfiguration to quickly fetch and replace configuration without any time-consuming parser, no serialization and deserialization - replace the configuration directly against the configuration file instead of
calling a child process to do
npm config set registry=..., becausenpmhas too many internal branches, which is the main reason for getting stuck
License
Made with markthree
Published under MIT License.