vue腳手架項(xiàng)目創(chuàng)建步驟詳解
vue腳手架 —> vue.cli
快速的創(chuàng)建一個(gè)大型的功能齊全的vue項(xiàng)目模板(初始化項(xiàng)目)
土味解釋:快速的創(chuàng)建一個(gè)空的vue項(xiàng)目
安裝(全局安裝)
- 全局安裝
> npm i @vue/cli -g
- 創(chuàng)建vue腳手架項(xiàng)目
> vue create 項(xiàng)目名
配置選項(xiàng)
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
- 按上下選擇 ,回車確認(rèn),這里選擇第三項(xiàng)手動(dòng)
選擇功能
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
- 上下移動(dòng)光標(biāo),空格選擇,回車確認(rèn),這里選擇 1 2 5 6 選項(xiàng)
選擇版本
? 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)
- 這里選擇 2.x
是否使用歷史模式
? Use history mode for router? (Requires proper server setup for index fallback in production) (Y/n)
- 這里輸入n 回車
Babel, ESLint等的配置位置
? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys) > In dedicated config files In package.json
- 這里選擇選擇第一項(xiàng) 專用配置文件存放
是否存為預(yù)置
? Save this as a preset for future projects? (y/N)
- 這里選擇 n
創(chuàng)建成功
Vue CLI v4.5.11 Creating 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.js added 1208 packages from 928 contributors in 21.836s 61 packages are looking for funding run `npm fund` for details 🚀 Invoking generators... 📦 Installing additional dependencies... added 5 packages from 1 contributor in 4.671s 61 packages are looking for funding run `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
進(jìn)入項(xiàng)目 目錄
> cd myvue2
啟動(dòng)服務(wù)
> npm run serve
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.
到此這篇關(guān)于vue腳手架項(xiàng)目創(chuàng)建步驟詳解的文章就介紹到這了,更多相關(guān)vue腳手架項(xiàng)目創(chuàng)建內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Vue實(shí)現(xiàn)一種簡單的無限循環(huán)滾動(dòng)動(dòng)畫的示例
這篇文章主要介紹了Vue實(shí)現(xiàn)一種簡單的無限循環(huán)滾動(dòng)動(dòng)畫的示例,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-01-01淺談vue的props,data,computed變化對組件更新的影響
本篇文章主要介紹了淺談vue的props,data,computed變化對組件更新的影響,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-01-01利用vue.js把靜態(tài)json綁定bootstrap的table方法
今天小編就為大家分享一篇利用vue.js把靜態(tài)json綁定bootstrap的table方法,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-08-08vue+ElementPlus框架Container 布局容器不能鋪滿整個(gè)屏幕的解決方案
這篇文章主要介紹了vue+ElementPlus框架Container 布局容器不能鋪滿整個(gè)屏幕的解決方案,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友參考下吧2024-01-01Vue手把手教你擼一個(gè) beforeEnter 鉤子函數(shù)
這篇文章主要介紹了Vue手把手教你擼一個(gè) beforeEnter 鉤子函數(shù),小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-04-04