一、安装及配置
0、查询npm版本 npm -v //如果小于3.0.8
安装最新版本:npm i npm -g
1、安装webpack:(全局安装) //查看版本webpack -v
npm install webpack -g
2、安装vue.js //查看版本vue -v
npm install vue -g
3、安装vue命令行工具
npm install -g vue-cli
4、创建项目
vue init webpack study #(study为项目名)
Project name study
Project description A Vue.js project
Author Sally <sally_hzy@126.com>
Vue build standalone
Install vue-router? Yes
Use ESLint to lint your code? No
Setup unit tests with Karma + Mocha? Yes
Setup e2e tests with Nightwatch? Yes
5、cd study
6、安装package.json中的插件
根据需要安装
7、运行
npm run dev
8、浏览器访问:http://localhost:8080