Change Host just in command line for MAC OS.
Inspired by chrome-hostadmin
npm install -g chost
Edit your host file content like below:
# work fine(comments)
#==== stable_master
10.165.124.255 www.xx.com
10.165.124.255 www.xx.com.hk
10.165.124.255 globalms.ll.com
10.165.124.255 m.xx.com
10.165.124.255 m.xx.com.hk
#====
# not work(comments)
#==== stable_dev
# 10.165.124.255 www.xx.com
# 10.165.124.255 www.xx.com.hk
# 10.165.124.255 globalms.ll.com
# 10.165.124.255 m.xx.com
# 10.165.124.255 m.xx.com.hk
#====
quick change host:
chost -n stable_dev
Then host file content turns to:
#==== stable_master
# 10.165.124.255 www.xx.com
# 10.165.124.255 www.xx.com.hk
# 10.165.124.255 globalms.ll.com
# 10.165.124.255 m.xx.com
# 10.165.124.255 m.xx.com.hk
#====
#==== stable_dev
10.165.124.255 www.xx.com
10.165.124.255 www.xx.com.hk
10.165.124.255 globalms.ll.com
10.165.124.255 m.xx.com
10.165.124.255 m.xx.com.hk
#====
list all available hostname
chost -l
close certain host by hostname:
chost -c stable_dev
Close all hosts
chost -q
yarn dev
yarn build
- git clone this project to your local.
- run
npm link
at root directory. - The enter file is
index.js
. You can make some change in it, while runningchost
command without any publishing to see your change.