您的位置:首页 > Web前端 > Vue.js

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

2018-07-20 13:52 281 查看
版权声明:原创文章,未经博主同意,不得擅自转载! https://blog.csdn.net/qq_36718999/article/details/81128899

第一步:全局安装vue-cli 

[code]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模板

[code]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".

第三步:安装依赖

[code]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

第四步:运行项目

[code]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

[code]/*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

第七步:进行项目开发

 

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: