npm install -g vue-cli
在ubuntu中下載位置位於
/usr/local/lib/node_modules/vue-cli
執行vue -V 可以查看版本
裝了atom IDE,install了language vue plugin。
然後執行vue init webpack mydemo 報錯
因為nodejs的版本太低了,現在是0.10
執行
sudo npm cache clean -f sudo npm install -g n sudo n stable
升級nodejs 到7.4.0
再次執行
vue init webpack my-project
現在會出很多提示,其中projectname不能帶-,改成mydemo
生成了項目文件見附件2
再執行 npm install 安裝項目依賴modules
運行開發環境
# serve with hot reload at localhost:8080
npm run dev
運行正式環境
# build for production with minification
執行測試
npm run build
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
參考:http://www.qdfuns.com/notes.php?mod=view&u=15904&id=fbb4d15b9c22fd373b605805bde8fd44
繼續研究ING。。。