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.
相关文章
相关标签/搜索