前提:已安装node.js、git
1、打开node.js command prompt(Node.J命令提示符)
2、选择项目的位置,通过命令行进入该目录。比如进入e盘:(e:),进入文件夹:(cd 文件链接地址)
3、使用脚手架安装项目(项目是基于webpack的):vue init webpack demo项目名
Project name(工程名): demo
Project description(工程介绍) :回车
Author:作者名
Vue build(是否安装编译器):回车
Install vue-router(是否安装Vue路由):回车
Use ESLint to lint your code(是否使用ESLint检验js代码):n
Set up unit tests(安装单元测试工具):n
Set up e2e tests with Nightwatch(是否安装到端测试工具):n
Should we run npm install for you after the project has been created?:回车
4、进入demo文件夹内
5、安装淘宝镜像 npm install -g cnpm --registry=http://registry.npm.taobao.org
6、安装vue-cli脚手架 cnpm install -g vue-cli (安装完使用vue检查)
7、进入项目目录,安装项目依赖组件 cnpm install (安装完后会有node_modules文件夹)
8、运行项目 npm run dev
最后完成了项目的创建及运行。。。。。