2018-10-22 总结

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
下次再写项目时直接开启服务器即可

你可能感兴趣的:(2018-10-22 总结)