vue 安装

来源:互联网 发布:定额预算软件破解版 编辑:程序博客网 时间:2024/06/07 12:54
  • 1 安装 node 6.0以上
  • 2 安装 npm 或者 cnpm
    npm install -g cnpm –registry= https://registry.npm.taobao.org
  • 3 安装 vue-cli 命令 npm install -g vue-cli

    https://github.com/vuejs/vue-cli

  • 4 安装完后可以输入命令 vue 可以看到一些信息

  • 5 切到响应的目录,开始一个webpack模板的eSell项目。 命令: vue init webpack init

? Project name sell  (项目名)? Project description e sell  (项目描述)? Author longcheng <*******@qq.com> (用户)? Vue build standalone  渐进增强? Install vue-router? Yes (安装vue路由)? Use ESLint to lint your code? Yes (安装代码检测)? Pick an ESLint preset Standard (代码检测预设)? Setup unit tests with Karma + Mocha? (测试用  不需要)? Setup e2e tests with Nightwatch? No (测试用  不需要)
  • 6 npm install
  • //7 安装 vue 路由模块 vue-router 和网络请求模块 vue-resource,输入:cnpm install
    vue-router vue-resource –save。
  • 8 npm run dev

这里写图片描述

原创粉丝点击