Mac搭建Vue开发环境

1.安装Homebrew

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

2.安装完成后Homebrew查看版本信息

brew -v

3.安装node.js

brew install nodejs

4.安装完成后查看node.js版本号

node -v

5.安装淘宝镜像npm

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

6.安装webpackage

cnpm install webpack -g

7.安装vue脚手架(自动搭建vue项目框架的工具)

sudo npm install -g vue-cli

8.检查vue是否安装成功

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.

猜你喜欢

转载自www.cnblogs.com/zhiaijingming/p/10458235.html