1、安装cli-init:
npm install -g @vue/cli-init
2、根据webpack模板生成项目:
vue init webpack myweb
? Project name mywebs
? Project description my fist web from vue-cli
? Author winfred
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? No
? 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
接下去自动安装cli-router
3、编译项目:
cd myweb
npm run dev
4、停止服务:
CTRL·+C