- 首先安裝node cnpm
- cmd中:
npm install -g vue-cli
- cd切換到目標(biāo)目錄下,新建cli項(xiàng)目
vue init webpack projectName
- 然后對(duì)項(xiàng)目進(jìn)行配置斟冕,其中要添加 runtime-compiler ?vue-router缅阳。
- 學(xué)習(xí)時(shí),暫時(shí)不要添加eslint。
- cd到項(xiàng)目文件夾中秀撇,安裝依賴
cnpm install
- 然后使用webstorm等ide打開(kāi)項(xiàng)目即可超棺。
- 在webstrom中打開(kāi)terminal,運(yùn)行項(xiàng)目:
npm run dev