vue脚手架

at first,put cnpm insteat of npm to make the spirit faster and happier

#npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a #serious bug with socket data flow and an import issue introduced in 2.1.0

#解决办法:降低版本 npm install [email protected] -g   mac中安装还会要 sudo -s 命令
npm install -g cnpm --registry=https://registry.npm.taobao.org
#and then get vue global
cnpm install -g vue
# 创建一个基于 "webpack" 模板的新项目
vue init webpack project-name
#再根据基本信息填 注意一开始的项目名不能填 大写,否则不陈功
#安装依赖
cd project-name
cnpm install
cnpm run dev 启动项目

#下载git并安装,先在码云上新建一个git项目
git config --global user.name "你的名字或昵称"
git config --global user.email "你的邮箱"
#在你的项目文件夹外 ctrl+右键  打开命令行,初始化这些文件,并且添加到码云中
git init 
git remote add origin <你的项目地址> //注:项目地址形式为:https://gitee.com/xxx/xxx.git或者 [email protected]:xxx/xxx.git
#推上去
git pull origin master
<这里需要修改/添加文件,否则与原文件相比就没有变动>
git add .
git commit -m "第一次提交"
#然后如果需要账号密码的话就输入账号密码,这样就完成了一次提交。
git push origin master

猜你喜欢

转载自my.oschina.net/xlpapapa/blog/1793625