这篇文章主要介绍了vue脚手架项目创建步骤详解,文章讲解的很清晰,初学者可以跟着步骤学习下
这篇文章主要介绍了vue脚手架项目创建步骤详解,文章讲解的很清晰,初学者可以跟着步骤学习下
这篇文章主要介绍了vue脚手架项目创建步骤详解,文章讲解的很清晰,初学者可以跟着步骤学习下
快速的创建一个大型的功能齐全的vue项目模板(初始化项目)
土味解释:快速的创建一个空的vue项目
|
1
|
> npm i @vue/cli -g |
|
1
|
> vue create 项目名<br type="_moz"> |
配置选项
|
1
2
3
4
5
|
Vue CLI v4.5.11? Please pick a preset: (Use arrow keys)> Default ([Vue 2] babel, eslint) Default (Vue 3 Preview) ([Vue 3] babel, eslint) Manually select features |
选择功能
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Vue CLI v4.5.11? 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)>(*) Choose Vue version (*) Babel ( ) TypeScript ( ) Progressive Web App (PWA) Support ( ) Router ( ) Vuex ( ) CSS Pre-processors (*) Linter / Formatter ( ) Unit Testing ( ) E2E Testing |
选择版本
|
1
2
3
4
|
? Check the features needed for your project: Choose Vue version, Babel, Router, Vuex? Choose a version of Vue.js that you want to start the project with (Use arrow keys)> 2.x 3.x (Preview) |
是否使用历史模式
|
1
|
? Use history mode for router? (Requires proper server setup for index fallback in production) (Y/n) |
Babel, ESLint等的配置位置
|
1
2
3
|
? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)> In dedicated config files In package.json |
是否存为预置
|
1
|
? Save this as a preset for future projects? (y/N) |
创建成功
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
Vue CLI v4.5.11Creating project in D:\MyStudy\myvue2. Installing CLI plugins. This might take a while...> core-js@3.9.1 postinstall D:\MyStudy\myvue2\node_modules\core-js> node -e "try{require('./postinstall')}catch(e){}"> ejs@2.7.4 postinstall D:\MyStudy\myvue2\node_modules\ejs> node ./postinstall.jsadded 1208 packages from 928 contributors in 21.836s61 packages are looking for fundingrun `npm fund` for details Invoking generators...Installing additional dependencies...added 5 packages from 1 contributor in 4.671s61 packages are looking for fundingrun `npm fund` for details Running completion hooks... Generating README.md...Successfully created project myvue2. Get started with the following commands:$ cd myvue2$ npm run serve |
进入项目 目录
|
1
|
> cd myvue2 |
启动服务
|
1
|
> npm run serve<br type="_moz"> |
|
1
2
3
4
5
6
7
8
|
DONE Compiled successfully in 2492ms App running at:- Local: http://localhost:8080/ - Network: http://192.168.17.154:8080/Note that the development build is not optimized.To create a production build, run npm run build. |
到此这篇关于vue脚手架项目创建步骤详解的文章就介绍到这了,更多相关vue脚手架项目创建内容请搜索米米素材网以前的文章或继续浏览下面的相关文章希望大家以后多多支持米米素材网!
原文链接:https://blog.csdn.net/weixin_44187139/article/details/114269380
发表评论