A development tool, automatically refresh the browser when file changed Like LiveEdit
Later any further need not call it a day to refresh your browser.
Support: WEB dev, PHP, Node.js, Python, etc...
Usage of orange:
-http=":4000": Static server port, The port must>1024, default :4000
-ignores="": Not watch files, split width `,` Not regexp eg: `.go,.git/`, default no ignores
-precmd="": Before refresh browser, execute precmd command. eg: `ls {0}`, {0} is the changed file
-proxy="": Proxy webserver when file saved refresh browser, like :80
-rootdir="./": Server root dir, default current dir
-watchdir="./": Watch dir which change will refresh the browser, default current dir
eg:
cd ~/Sites/
orange -proxy 80 -watchdir ~/Sites/blog/ -ignores .cache,.db
- If you don't want to monitor files, set
orange -ignores .
- If you want ignore some dirs, eg:
orange -ignores ".git,.svn,dirs"
- If you want run command when file change, set
-precmd
eg: `orange -precmd "du -sh {0}" - For PHP/Node.js/etc... , You can proxy your proxy, eg: proxy apache
orange -portproxy 80
- If not port proxy, cd your dir, run orange, view a html file when current dir files change, browser will refresh automatically
- When start,
Automatically Open URL http://localhost:${yourport}
in your Browser
Binaries
Rename orange-xxx-$VERSION
to orange
, And move orange file to your $PATH
If you have already installed the golang
go get -u github.com/wangxian/orange
THEN add your $GOPATH/bin
to your $PATH
orange's
code uses the MIT license, see our LICENSE
file.