vue项目搭建

vue环境配置:

  首先安装node:http://www.runoob.com/nodejs/nodejs-install-setup.html
  1、安装淘宝镜像:npm install -g cnpm --registry=https://registry.npm.taobao.org
      注:下面的npm可换成cnpm下载快
  2、安装webpack:npm install webpack -g
  3、安装vue脚手架:npm install vue-cli -g
  4、cd 目录
  5、创建项目:vue init webpack 工程名

    Use ESLint to lint your code:这个是代码警告提示这个很烦人的建议最好不要

    

    安装后的项目目录

    
  6、安装项目依赖:npm install
  7、安装 vue 路由模块vue-router和网络请求模块vue-resource:cnpm install vue-router vue-resource --save
  8、安装elementui:npm install element-ui --save
  9、安装vue的gridster:npm install vue-power-drag 
  10、安装echarts:npm install echarts -S

  11、安装axios惊醒HTTP请求:npm install axios
  12、启动项目:npm run dev

原文地址:https://www.cnblogs.com/yingxi0/p/8110604.html