Browse Source

feat(node): 加入node安装配置脚本

master
Alvis Zhao 5 years ago
commit
a9ca2ff68a
  1. 3
      README.md
  2. 24
      node_install.sh

3
README.md

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
# 常用脚本
基于ubuntu 18.04系统的常用脚本

24
node_install.sh

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
#!/bin/bash
echo "export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node" >> ~/.bashrc
# 码云镜像加速
wget -qO- https://gitee.com/mirrors/nvm/raw/master/install.sh | bash
source ~/.bashrc
nvm install v12.18.2
nvm use v12.18.2
# npm源
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
npm config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs/
npm config set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver
npm config set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver
npm config set selenium_cdnurl https://npm.taobao.org/mirrors/selenium
# 常用工具
npm i -g commitizen
npm i -g cz-conventional-changelog
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
Loading…
Cancel
Save