Skip to content

Latest commit

 

History

History
96 lines (79 loc) · 2.44 KB

Building.md

File metadata and controls

96 lines (79 loc) · 2.44 KB

Building

Summary

//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

Detail

1.Install git

2.Install nodejs

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.

3.Set Config

//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/

4.Git Clone

git clone https://github.com/zhuzhuyule/HexoEditor.git

5.Install Package

npm install

Tip

//If find Error about download Electron faild ,you can try run those
npm install -g electron@1.8.1

6.Start

npm start