npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mirror-config

v0.0.2

Published

Mirrors in China about node.js

Downloads

19

Readme

NPM version Travis AppVeyor codecov

为中国内地的Node.js开发者准备的镜像配置,大大提高node模块安装速度。

特性

  • 支持Windows和其他操作系统
  • 自动配置各个node模块的安装源为淘宝镜像

安装

npm i -g mirror-config --registry=https://registry.npmmirror.com
# 查看npm配置
npm config list
# 查看环境变量
source ~/.bashrc && env

参数

--registry=https://registry.npmmirror.com

registry.npmjs.com 镜像URL

--bin-mirrors-prefix=https://cdn.npmmirror.com/binaries

cdn.npmmirror.com/binaries 镜像URL,会覆盖下文中的{bin-mirrors}

--apt-mirrors-prefix=https://mirrors.tuna.tsinghua.edu.cn

mirrors.tuna.tsinghua.edu.cn 镜像URL,会覆盖下文中的{apt-mirrors}

--ali-mirrors-prefix=https://mirrors.aliyun.com

mirrors.aliyun.com 镜像URL,会覆盖下文中的{ali-mirrors} 阿里云ECS VPC或经典网络用户请分别使用http://mirrors.cloud.aliyuncs.comhttp://mirrors.aliyuncs.com代替

--nodejs-org-mirror={bin-mirrors}/node (别名: --disturl)

nodejs.org/dist 镜像URL

--iojs-org-mirror={bin-mirrors}/iojs

iojs.org/dist 镜像URL

--nvmw-npm-mirror={bin-mirrors}/npm

github.com/npm/npm/releases 镜像URL

--apt-mirror={ali-mirrors}

Debian/Ubuntu APT镜像URL

--apt-gitlab-runner={apt-mirrors}/gitlab-runner/{release-id}

GitLab Runner APT镜像URL

--apt-docker-ce={ali-mirrors}/docker-ce/linux/{release-id}

Docker社区版 APT镜像URL

--apt-gitlab-ce={apt-mirrors}/gitlab-ce/{release-id}

GitLab社区版 APT镜像URL

--apt-virtualbox={apt-mirrors}/virtualbox/apt

VirtualBox APT镜像URL

--apt-nodesource={apt-mirrors}/nodesource/deb

NodeJS APT镜像URL前缀

其他

其他参数将被写入.npmrc文件中

安装成功后,针对以下组件的镜像URL,将被写入npm用户配置文件(~/.npmrc)中

为项目生成镜像配置文件

cd ~/my-project
mirror-config --registry=https://registry.npmmirror.com

Docker构建时使用

RUN npm config set registry https://registry.npmmirror.com && npm install --unsafe-perm -g mirror-config
RUN npm ci