使用vue-cli創建項目

  • 選擇項目所在的位置,通過命令行進入該目錄(或者直接在該目錄,右鍵,打開命令行)。
  • 使用腳手架安裝項目: vue init webpack demo 項目是基於webpack的
    Project name(工程名):回車
    Project description(工程介紹):回車
    Author:作者名
    Vue build(是否安裝編譯器):回車
    Install vue-router(是否安裝Vue路由):回車
    Use ESLint to lint your code(是否使用ESLint檢查js代碼):n
    Set up unit tests(安裝單元測試工具):n
    Setup e2e tests with Nightwatch(是否安裝端到端測試工具):n
    Should we run npm install for you after the project has been created? (recommended):回車

 

  • 進入項目目錄:cd demo
  • 安裝項目所需要的依賴:npm install
  • 啓動項目:npm run dev

     啓動成功,瀏覽器打開:localhost:8080,即可看到vue項目。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章