#安裝淘寶鏡像 npm install -g cnpm --registry=https://registry.npm.taobao.org
#安裝vue-cli
cnpm install vue-cli -g
#查看是否安裝成功
vue -V
初始化項目 --projectdemo 項目名
vue init webpack projectdemo
? Project name demo //項目名稱 ? Project description this is demo //項目描述 ? Author ananiha // 作者 // 然后回車 ? Install vue-router? Y //y 安裝路由 ? Use ESLint to lint your code? N // n ? Set up unit tests No // n ? Setup e2e tests with Nightwatch? N // n ? Should we run `npm install` for you after the project has been cr ? Should we run `npm install` for you after the project has been cr ? Should we run `npm install` for you after the project has been cr mended) (Use arrow keys) Yes, use NPM > Yes, use Yarn No, I will handle that myself //回車 To get started: cd demo npm run dev Documentation can be found at https://vuejs-templates.github.io/webpack //根據以上提示輸入
cd demo //進入目錄 cnmp install //提示會少這一命令 如果根據提示啟動失敗加這一句 npm run dev //啟動 會自己跳轉瀏覽