Vue3.x 脚手架安装以及使用
作者:互联网
一、步骤
C:\Users\Administrator>npm install -g @vue/cli
D:\前端\code>vue create demo
Vue CLI v4.5.12
? Please pick a preset:
Default ([Vue 2] babel, eslint)
Default (Vue 3 Preview) ([Vue 3] babel, eslint)
> Manually select features
Vue CLI v4.5.12
? Check the features needed for your project:
(*) Choose Vue version
(*) Babel
( ) TypeScript
( ) Progressive Web App (PWA) Support
(*) Router
>(*) Vuex
( ) CSS Pre-processors
(*) Linter / Formatter
( ) Unit Testing
( ) E2E Testing
Vue CLI v4.5.12
? Choose a version of Vue.js that you want to start the project with
2.x
> 3.x (Preview)
Vue CLI v4.5.12
? Pick a linter / formatter config: (Use arrow keys)
> ESLint with error prevention only
ESLint + Airbnb config
ESLint + Standard config
ESLint + Prettier
? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)
> 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) N
# 启动
cd demo
npm run serve
App running at:
- Local: http://localhost:8080/
- Network: http://192.168.1.56:8080/
# 访问:http://localhost:8080/
二、文件结构
├─node_modules
│ .browserslistrc
│ .eslintrc.js
│ .gitignore
│ babel.config.js
│ package-lock.json
│ package.json
│ README.md
│
├─public
│ favicon.ico
│ index.html
│
└─src
│ App.vue
│ main.js
│
├─assets
│ logo.png
│
└─components
HelloWorld.vue
标签:Vue,安装,js,vue,ESLint,Vue3,脚手架,config,v4.5 来源: https://www.cnblogs.com/q-linyu/p/14742102.html