1. 程式人生 > >新建一個vue專案

新建一個vue專案

步驟:

1.安裝node.js

 檢視是否安裝成功  npm -v

2.安裝淘寶映象

npm install -g cnpm --registry=https://registry.npm.taobao.org

3.全域性安裝vue -cli 腳手架

cnpm install vue-cli -g

4.使用cli新建專案

vue init webpack testdemo

5.進入到專案根目錄,安裝專案所需要的依賴

cd testdemo
cnpm install

6.啟動專案

npm start

或者

npm run dev

7.打包專案成靜態檔案

npm run build