1.widows配置node.js
#1.去官网下载NodeJS安装包
下载链接:https://nodejs.org/en/,直接点击下载按钮就可以了。
#2.安装
因为windows的管理员权限机制,默认安装后需要以管理员身份运行
#3.检测安装成功
打开命令提示符,以管理员身份运行Git Bash或者刚刚安装好的Node.js command prompt
看到如下显示表示安装成功
C:\Windows\system32>node -v
v14.16.0
2.Git打包编译
#1.新建本地Git数据存放文件夹
#2.运行Git Bash软件
#3.进入Git存放文件夹
$ cd /d/DataXgroup/Gitlab/2/
#4.初始化Git仓库
$ git init
Initialized empty Git repository in D:/DataXgroup/Gitlab/2/.git/
#5.拉取远程仓库代码
$ git clone http://192.168.1.13:8099/mjn-data-lake/webproject-tagging-system.git
Cloning into 'webproject-tagging-system'...
remote: Enumerating objects: 227, done.
remote: Counting objects: 100% (227/227), done.
remote: Compressing objects: 100% (199/199), done.
remote: Total 227 (delta 47), reused 166 (delta 16), pack-reused 0
Receiving objects: 100% (227/227), 761.73 KiB | 22.40 MiB/s, done.
Resolving deltas: 100% (47/47), done.
#6.安装npm编译
$ cd webproject-tagging-system/
$ npm install
#7.创建本地分支并切换到分支
$ git checkout -b tag0325
Switched to a new branch 'tag0325'
#8.关联远程分支
$ git branch --set-upstream-to=origin/tag0325
Branch 'tag0325' set up to track remote branch 'tag0325' from 'origin'.
#9.拉取远程分支
$ git pull
#10.编译构建
$ npm run dev #本地编译测试
$ npm run build #构建编译生成文件