他是Vue.js官方提供的開發工具,可以快速的建置架構,常用於製作單頁應用(SPA)網站。
node -v
,有出現版本數字就代表安裝成功npm install -g @vue/cli
,完成後輸入vue -V
就會出現@vue/cli 4.5.13
,安裝就完成啦!!vue create [專案名稱]
Manually select features
Vue CLI v4.5.13
? Please pick a preset: (Use arrow keys)
> no1 ([Vue 3] dart-sass, babel, typescript)
Default ([Vue 2] babel, eslint)
Default (Vue 3) ([Vue 3] babel, eslint)
Manually select features
Choose Vue version
,其他的就依照使用習慣勾選Vue CLI v4.5.13
? 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
package.json
,也可以自行選擇要存放的位置dedicated config files
? Where do you prefer placing config for Babel, ESLint, etc.? (Use arrow keys)
> In dedicated config files
In package.json
Successfully created project
cd [專案名稱]
指令與npm run serve
啟動專案App running at:
- Local: http://localhost:8080/
http://localhost:8080/
看到下面的畫面代表專案建置成功!!!!