🎈前言

准备给hexo扩展几个插件,一开始用npm的方式安装,速度慢的令人咋舌,

于是准备找一种方式给hexo安装插件的时候提速。

几经周折,发现使用淘宝的cnpm镜像会大大提升安装插件的速度。

🎄使用方式

1.首先安装淘宝镜像

$ npm install -g cnpm --registry=https://registry.npm.taobao.org

2.安装模块

$ cnpm install [name]

其中 [name] 是我们要安装的插件名 , npm改为cnpm,其他参数不变。

💦例如

$ cnpm install hexo-deployer-ftpsync –save

💨注意

淘宝镜像为阿里云产物,服务器架设在国内,当cnpm上没有你需要的插件时,它会自动去npm服务器上寻找同时在保存至cnpm服务器上。


一个可爱的人