[[email protected] ~]# cd /usr/local/src/
[[email protected] src]# wget https://nodejs.org/download/release/v8.11.1/node-v8.11.1-linux-x64.tar.gz
[[email protected] src]# tar xf node-v8.11.1-linux-x64.tar.gz 
[[email protected] src]# cd node-v8.11.1-linux-x64/bin
[[email protected] bin]# ./node -v
v8.11.1

然后添加环境变量

[[email protected] bin]# vim /etc/profile
###########################################

export NODE_HOME=/usr/local/src/node-v8.11.1-linux-x64/

export PATH=$NODE_HOME/bin:$PATH
#################################
[[email protected] bin]# source /etc/profile
[[email protected] bin]# node -v
v8.11.1

生成添加gitlab**
[[email protected] work]# ssh-****** -t rsa -C [email protected]

[[email protected] work]# vim /root/.ssh/id_rsa.pub

前端打包流程
前端打包流程

[[email protected] work]# git clone [email protected]:eatjoys-front/eatjoys-front-min.git

或者指定分支

git clone -b develop  [email protected]:eatjoys-front/eatjoys-front-min.git

全局安装yarn
npm config set registry https://registry.npm.taobao.org/

npm install yarn -g //只下载一次

npm install //只下载一次

[[email protected] work]# npm install yarn -g 
/usr/local/src/node-v8.11.1-linux-x64/bin/yarn -> /usr/local/src/node-v8.11.1-linux-x64/lib/node_modules/yarn/bin/yarn.js
/usr/local/src/node-v8.11.1-linux-x64/bin/yarnpkg -> /usr/local/src/node-v8.11.1-linux-x64/lib/node_modules/yarn/bin/yarn.js
+ [email protected]
added 1 package in 2.051s
[[email protected] eatjoys-front-min]# npm config set registry https://registry.npm.taobao.org/
[[email protected] eatjoys-front-min]# npm  install
[[email protected] eatjoys-front-min]# yarn
[[email protected] eatjoys-front-min]# npm run build

然后dist目录就是打好的包了

相关文章:

  • 2021-04-26
  • 2021-04-04
  • 2022-12-23
  • 2021-12-18
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-12-21
相关资源
相似解决方案