Vue-cli 脚手架 初始化项目 笔记

73 阅读1分钟

1.在创建目录的上一目录执行命令 命令为

vue init webpack 项目名

再创建项目的时候会自动创建以项目名为名字的文件夹 以下是 vue 2.X 版本下 创建项目时的示例

E:\java\idea_java_maven\vue_login>vue init webpack vue_login_cli
? Target directory exists. Continue? Yes
? Project name vue_login_cli
? Project description A Vue.js project
? Author codervibe <3507557934@qq.com>
? 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 # 使用 npm 做包管理器