vue-cli2.x创建项目

1.安装cli2.x脚手架

npm install --global vue-cli

2.创建项目

vue init webpack 项目名

按照填写就行了

? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recommended) npm

然后就会自动创建项目了。

再进入项目目录,输入:

npm run dev

启动。

原文地址:https://www.cnblogs.com/joe235/p/12448860.html