上传coding和创建vue-cli项目

1、上传coding

git init
git add .
git commit -m "first commit"
git push -u origin master

2、创建vue-cli项目

1.先安装cnpm(淘宝镜像)
npm install -g cnpm --registry=https://registry.npm.taobao.org

注意:cnpm=npm 作用:提高速度

2.安装webpack
cnpm install webpack -g
3.安装vue-cli脚手架
cnpm install --global vue-cli

注意:上面这三步只需安装一次

4.使用vue-cli搭建项目
vue init webpack(模板名称)demo(项目名称)
5.进入文件夹
cd  项目名
6.安装依赖
cnpm install 

注意:安装依赖时先检查一下有没有node-modules文件夹,如果有直接开起服务,如果没有则使用cnpm install 命令安装然后开启服务。

7.开启一个服务器
npm run dev

下次再写项目时直接开启服务器即可

8.下载axios
cnpm install axios
9.压缩项目
cnpm run build

你可能感兴趣的:(上传coding和创建vue-cli项目)