Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
/ xnpm Public archive
forked from npm/cli

a "X" version of npm, extremely optimized fast on development

Notifications You must be signed in to change notification settings

LitileXueZha/xnpm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

xnpm - a "X" version of npm

Require node 16 or higher LTS.

Installation

$ npm install -g xnpm

Usage

xnpm <command>

Optimized commands

  • xnpm install
  • xnpm run <script>

Buy a newer CPU may better than these efforts~

Contribute

What does it affects npm performance?

Appearance Maybe Optimize Priority
- require splited modules, mainly on Windows filesystem ✓✓✓✓✓
pre-install scripts are silent - ✓✓✓
run-script slowly start up ?? ✓✓
lag on idealTree ??
lag on reify ??

Recommend Configurations

  configureOptimizedRC() {
    /**
     * Audit will send report to registry, it waste time
     * when install packages.
     */
    this.config.set('audit', false);
    /**
     * Know what happens is very important, there are some packages
     * run pre-install scripts when being installed.
     * 
     * If it lags, we can see what going on in console, not just
     * wait it finished.
     */
    this.config.set('foreground-scripts', true);
    /**
     * Default 5 minutes is too long, 10s is enough.
     */
    this.config.set('fetch-timeout', 10000);
    /**
     * The peerDependencies are unnecessary installed, users should
     * be responsible for it.
     */
    this.config.set('omit', 'peer');
    /**
     * Remind users of using proxy, sometimes they maybe forgot had
     * set a proxy and the install process frozen, without any
     * infomation.
     */
    const proxy = this.config.get('proxy');
    if (proxy) {
      log.warn('Using a proxy ==>', proxy);
    }
  }

Useful links

About

a "X" version of npm, extremely optimized fast on development

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Languages

  • JavaScript 99.9%
  • Other 0.1%