*vue環境安裝:
1.安裝node.js和npm
2.安裝Vue-cli
3.安裝webpack
----------------
1.安裝node.js和npm
https://nodejs.org/en/
*選最新版安裝:
12.2.0 Current
Latest Features
*檢查是否安裝成功:
node -v
npm -v
----------------
2.安裝Vue-cli
npm install vue-cli -g
----------------
3.安裝webpack
npm install webpack -g
==========================
*建立Vue新專案:
vue init webpack dm
相關問題與回答:
? Project name dm
? Project description A Vue.js project
? Author Eric Lin <eric@eric.com>
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? No
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
? Should we run `npm install` for you after the project has been created? (recommended) npm
--------------
cd dm
npm install
npm run dev
*在瀏覽器輸入:
http://localhost:8080
--------------
文件:
https://vuejs-templates.github.io/webpack
==========================
*npm常用指令:
*安裝 Module (-g 全局安裝)
npm install <Module Name> -g
*查 Module 版本
npm list <Module Name>
*移除 Module
npm uninstall <Module Name>
*更新 Module
npm update <Module Name>
沒有留言:
張貼留言