//is use Windows:
npm config set prefix "C:/Program Files/nodejs/npm_global"
npm config set cache "C:/Program Files/nodejs/npm_cache"
//if use Linux\Mac:
npm config set prefix "~/nodejs/npm_global"
npm config set cache "~/nodejs/npm_cache"
//If In China China China, you can set mirror to speed up !
npm config set registry "https://registry.npm.taobao.org"
npm config set electron_mirror "https://npm.taobao.org/mirrors/electron/"
git clone https://github.com/zhuzhuyule/HexoEditor.git
cd HexoEditor
npm install
npm start
- Download Page (English)
- 下载地址 (中文)
Tip
//Linux/Uinx sets link method
sudo ln -fs .../.../node-vX.X.X-linux-xXX/bin/node /usr/local/bin/node
sudo ln -fs .../.../node-vX.X.X-linux-xXX/bin/npm /usr/local/bin/npm
//OR if invalid
sudo ln -fs .../.../node-vX.X.X-linux-xXX/bin/node /usr/sbin/node
sudo ln -fs .../.../node-vX.X.X-linux-xXX/bin/npm /usr/sbin/npm
You can use which node
find info.
//If you want change cache path
npm config set prefix "path of npm_global"
npm config set cache "path of npm_cache"
//If In China China China, you can set mirror to speed up !
npm config set registry "https://registry.npm.taobao.org/"
npm config set electron_mirror "https://npm.taobao.org/mirrors/electron/"
eg:
//Windows:
npm config set prefix "C:/Program Files/nodejs/npm_global"
npm config set cache "C:/Program Files/nodejs/npm_cache"
//Linux\Mac:
npm config set prefix "~/nodejs/npm_global"
npm config set cache "~/nodejs/npm_cache"
淘宝 NPM 镜像 help you speed up where you are in China !
You can find .npmrc
from setting path or default path:
- Windows :
%HOMEPATH%/
- Linux/Unix/Mac:
~/
set content this:
registry=https://registry.npm.taobao.org/
electron_mirror=https://npm.taobao.org/mirrors/electron/
git clone https://github.com/zhuzhuyule/HexoEditor.git
npm install
Tip
//If find Error about download Electron faild ,you can try run those
npm install -g electron@1.8.1
npm start