VUE 腳手架搭建

2022-06-24 03:09:09 字數 1246 閱讀 1373

npm install vue-cli -g

vue init webpack projectname

$ vue init webpack exprice --------------------- 這個是那個安裝vue腳手架的命令

this will install vue 2.x version of the template. ---------------------這裡說明將要建立乙個vue 2.x版本的專案

for vue 1.x use: vue init webpack#1.0 exprice

? project name (exprice) ---------------------專案名稱

? project name exprice

? project description (a vue.js project) ---------------------專案描述

? project description a vue.js project

? author datura --------------------- 專案建立者

? author datura

? vue build (use arrow keys)

? vue build standalone

? install vue-router? (y/n) --------------------- 是否安裝vue路由,也就是以後是spa(但頁面應用需要的模組)

? install vue-router? yes

? use eslint to lint your code? (y/n) n ---------------------是否啟用eslint檢測規則,這裡個人建議選no

? use eslint to lint your code? no

? setup unit tests with karma + mocha? (y/n)

? setup unit tests with karma + mocha? yes

? setup e2e tests with nightwatch? (y/n)

? setup e2e tests with nightwatch? yes

vue-cli · generated "exprice".

to get started: --------------------- 這裡說明如何啟動這個服務

cd exprice

npm install

npm run dev

搭建Vue腳手架

從vue官網安利了一波安裝腳手架的主要 全域性安裝 vue cli npm install global vue cli 建立乙個基於 webpack 模板的新專案 vue init webpack my project 安裝依賴,走你 cd my project npm install npm r...

Vue腳手架搭建

sudo apt get install nodejs legacy nodejs sudo apt get install npm 安裝成功後檢視對應版本 npm install vuenpm install g cnpm registry vue安裝成功後檢視對應版本 npm install g...

vue腳手架搭建

一 vue cli腳手架的搭建步驟 首先,確定你的電腦上已經安裝了nodejs,可以使用npm包管理器安裝環境 1 開啟cmd命令視窗,切換到你要新建專案的資料夾下,此時可使用node v檢查node的版本,如果出現版本號則node已安裝。2 使用以下命令全域性安裝vue cli npm insta...