启动前台vue服务(小白操作,后续持续更新)
1、先更新代码到本地
E:\code\git_ec\page>git clone http://git.***.com/it/pt/***.git --branch 20210129
2、安装依赖
E:\code\git_ec\page\E-ams>npm install
依赖包被安装到了 node_modules
3、
E:\code\git_ec\page\E-ams>npm run serve
npm run xxx,并不是你想运行就运行的,只有在 package.json scripts 配置了,你才能 run 的.
package.json scripts 配置:
{
"name": "***-ams",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"serve_mock": "vue-cli-service serve --mode mock",
"build": "vue-cli-service build",
"test": "vue-cli-service build --mode test",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.18.0",
******************省略*************
npm run dev 和 npm run serve : https://www.cnblogs.com/fxwoniu/p/11353907.html
你真的知道 npm install 原理么 : https://zhuanlan.zhihu.com/p/128625669