【Vue】安装

来源:互联网 发布:智能算法优化 编辑:程序博客网 时间:2024/06/07 19:11

#全局安装 vue-cli

$ cnpminstall --global vue-cli

 

#创建一个基于 webpack模板的新项目

$ vueinit webpack my-project

 

#这里需要进行一些配置,默认回车即可

This will installVue 2.x version of the template.

For Vue 1.x use: vue init webpack#1.0 my-project

 

? Projectname my-project

? Projectdescription A Vue.js project

? Authorrunoob <test@runoob.com>

? Vuebuild standalone

? UseESLint to lint your code? Yes

? Pick anESLint preset Standard

? Setupunit tests with Karma + Mocha? Yes

? Setupe2e tests with Nightwatch? Yes

 

   vue-cli · Generated "my-project".

 

   To get started:

  

     cd my-project

     npm install

     npm run dev

  

   Documentation can be found athttps://vuejs-templates.github.io/webpack