首页 > 其他 > 详细

Vue3.x 脚手架安装以及使用

时间:2021-05-10 09:02:43      阅读:53      评论:0      收藏:0      [点我收藏+]

一、步骤

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

Vue3.x 脚手架安装以及使用

原文:https://www.cnblogs.com/q-linyu/p/14742102.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!