Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
>(*) Babel
( ) TypeScript
( ) Progressive Web App (PWA) Support
( ) Router
( ) Vuex
( ) CSS Pre-processors
(*) Linter / Formatter
( ) Unit Testing
( ) E2E Testing
Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
(*) Babel
(*) TypeScript
( ) Progressive Web App (PWA) Support
(*) Router
(*) Vuex
(*) CSS Pre-processors
>( ) Linter / Formatter
( ) Unit Testing
( ) E2E Testing
powershell复制代码
Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, TS, Router, Vuex, CSS Pre-processors
? Choose a version of Vue.js that you want to start the project with (Use arrow keys)
> 3.x
2.x
然后它又提示我选择 Vue 版本 这里选择 Vue 3.x
powershell复制代码
Vue CLI v5.0.8
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, TS, Router, Vuex, CSS Pre-processors
? Choose a version of Vue.js that you want to start the project with 3.x
? Use class-style component syntax? (y/N) N # 是否使用 es6 的语法 来创建 Vue 的组件 果断选择 N
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? (Y/n)
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes # 是否使用历史记录模式
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): # 选择 一下 CSS 预处理器
Sass/SCSS (with dart-sass)
> Less # 简单点选择 Less
Stylus
? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys) # 这些配置 是分开写在每个配置文件中 还是 统一写在 package.json 中
> In dedicated config files
In package.json
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? (y/N) # 是否保存我们当前的选择 这里选择 No 这里英文的意思 是否 保存当前的配置 在未来的项目中使用
配置完成之后就会去自动的 创建整个项目
powershell复制代码
Vue CLI v5.0.8
✨ Creating project in E:\java\idea_java_maven\SystemFacesignin\vue_systemfacesignin.
⚙️ Installing CLI plugins. This might take a while...
added 852 packages in 2m
🚀 Invoking generators...
📦 Installing additional dependencies...
added 34 packages in 17s
⚓ Running completion hooks...
📄 Generating README.md...
🎉 Successfully created project vue_systemfacesignin.
👉 Get started with the following commands:
$ cd vue_systemfacesignin
$ npm run serve
PS E:\java\idea_java_maven\SystemFacesignin>
安装完成之后 进入的项目目录下 启动项目即可
powershell复制代码
PS E:\java\idea_java_maven\SystemFacesignin> cd vue_systemfacesignin # 进入到项目的根目录中
PS E:\java\idea_java_maven\SystemFacesignin\vue_systemfacesignin> npm install # 安装一下 项目依赖
up to date in 14s
PS E:\java\idea_java_maven\SystemFacesignin\vue_systemfacesignin>
PS E:\java\idea_java_maven\SystemFacesignin\vue_systemfacesignin> npm run serve
> [email protected] serve
> vue-cli-service serve
INFO Starting development server...
DONE Compiled successfully in 10626ms 23:23:36
App running at:
- Local: http://localhost:8080/
- Network: http://192.168.1.4:8080/
Note that the development build is not optimized.
To create a production build, run npm run build.
No issues found.
安装需要的组件 比如 element-plus
安装 element-plus
powershell复制代码
PS E:\java\idea_java_maven\SystemFacesignin\vue_systemfacesignin> vue add element-plus
WARN There are uncommitted changes in the current repository, it's recommended to commit or stash them first.
? Still proceed? Yes
📦 Installing vue-cli-plugin-element-plus...
added 1 package in 16s
✔ Successfully installed plugin: vue-cli-plugin-element-plus
? How do you want to import Element Plus? Fully import
? Do you want to overwrite the SCSS variables of Element Plus? Yes
? Choose the locale you want to load, the default locale is English (en) zh-cn
🚀 Invoking generator for vue-cli-plugin-element-plus...
📦 Installing additional dependencies...
added 14 packages in 38s
⚓ Running completion hooks...
✔ Successfully invoked generator for plugin: vue-cli-plugin-element-plus
PS E:\java\idea_java_maven\SystemFacesignin\vue_systemfacesignin>