美文网首页
安装开发环境

安装开发环境

作者: heiheiwanne | 来源:发表于2016-11-02 19:52 被阅读18次

1.Mac上安装Node和NPM
2.vue
3.webpack
4.taobao cnpm

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

2.brew link node brew install node

3.npm install -g cnpm --registry=https://registry.npm.taobao.org
(我们定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm
:)
4.cnpm i -g (安装cnmp)

5.cnmp i webpack -g (安装webpack)

6.cnmp i wevpack-dev-server -g (安装webpack-dev-server)

7.cnmp build node-sass (build node-sass)

8.webpack-dev-server --inline (编译build.js 并开启服务)

9.http://localhost:8080/index (查看页面)

'#################################'

如果页面(http://localhost:8080/index)被占用

1.查看进程
sudo lsof -i -n -P|grep 8080

lsof -i 4TCP

nettop -nm tcp

ps -aux

2.杀死进程

pkill ApplicationName (exam: pkill QQ ;;;; pkill java)

相关文章

网友评论

      本文标题:安装开发环境

      本文链接:https://www.haomeiwen.com/subject/nrzvuttx.html