- 選擇項目所在的位置,通過命令行進入該目錄(或者直接在該目錄,右鍵,打開命令行)。
- 使用腳手架安裝項目: 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 runnpm install
for you after the project has been created? (recommended):回車
- 進入項目目錄:cd demo
- 安裝項目所需要的依賴:npm install
- 啓動項目:npm run dev
啓動成功,瀏覽器打開:localhost:8080,即可看到vue項目。