Mac搭建Vue開發環境

1.安裝Homebrewcss

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2.安裝完成後Homebrew查看版本信息vue

brew -v

3.安裝node.jsnode

brew install nodejs

4.安裝完成後查看node.js版本號webpack

node -v

5.安裝淘寶鏡像npmgit

npm install -g cnpm --registry=https://registry.npm.taobao.org

6.安裝webpackagegithub

cnpm install webpack -g

7.安裝vue腳手架(自動搭建vue項目框架的工具)web

sudo npm install -g vue-cli

8.檢查vue是否安裝成功vue-cli

vue list

輸出信息以下: houzi
-2:usr houzi$ vue list Available official templates: ★ browserify - A full-featured Browserify + vueify setup with hot-reload, linting & unit testing. ★ browserify-simple - A simple Browserify + vueify setup for quick prototyping. ★ pwa - PWA template for vue-cli based on the webpack template ★ simple - The simplest possible Vue setup in a single HTML file ★ webpack - A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction. ★ webpack-simple - A simple Webpack + vue-loader setup for quick prototyping.
相關文章
相關標籤/搜索