vue-cli创建vue.js项目并添加git版本控制

查看更多资源

第一步:全局安装vue-cli 

C:\Users\小羊先生>npm install vue-cli --global
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
c:\web\nodejs\node_global\vue -> c:\web\nodejs\node_global\node_modules\vue-cli\bin\vue
c:\web\nodejs\node_global\vue-init -> c:\web\nodejs\node_global\node_modules\vue-cli\bin\vue-init
c:\web\nodejs\node_global\vue-list -> c:\web\nodejs\node_global\node_modules\vue-cli\bin\vue-list
+ vue-cli@2.9.6
added 8 packages, removed 20 packages and updated 55 packages in 128.369s

第二步:新建项目、初始化vue模板

C:\Users\小羊先生\Desktop>vue init webpack vuex-notes-example

? Project name vuex-notes-example
? Project description A Vue.js project
? Author guiyangyang <guiyangyang@playhudong.com>
? Vue build standalone
? Install vue-router? No
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recommended) npm

   vue-cli · Generated "vuex-notes-example".

第三步:安装依赖

C:\Users\小羊先生\Desktop>cd vuex-notes-example

C:\Users\小羊先生\Desktop\vuex-notes-example>npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 68 packages in 13.96s

第四步:运行项目

C:\Users\小羊先生\Desktop\vuex-notes-example>npm run dev

> vuex-notes-example@1.0.0 dev C:\Users\小羊先生\Desktop\vuex-notes-example
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
 95% emitting
 DONE  Compiled successfully in 4897ms                                                                          11:50:59
 I  Your application is running here: http://localhost:8080

第五步:github新建远程仓库

 

第六步:项目初始化git,并提交至github

/*cmd*/
/* vuex-notes-example 项目目录下 依次输入*/
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/guiyangyang/vuex-notes-example.git
git push -u origin master

第七步:进行项目开发

更多资源 - 免费分享

 

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值