orange

command module
v0.0.0-...-a865c43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2013 License: MIT Imports: 16 Imported by: 0

README

orange

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

Usage of orange:
  -dir="./": Watch dir which change will refresh the browser, default current dir
  -ignores="": Not watch files, split width `,` Not regexp eg: `.go,.git/`, default no ignores
  -port=4000: Static server port, The port must>1024, default 4000
  -portproxy=0: Proxy http://localhost:{{port}}/ when file saved refresh browser, set 0 not proxy
  -precmd="": Before refresh browser, execute precmd command. eg: `ls {0}`, {0} is the changed file

eg:

cd ~/Sites/
orange -portproxy 80 -dir ~/Sites/blog/ -ignores .cache,.db
Notes
  1. If you don't want to monitor files, set orange -ignores .
  2. If you want ignore some dirs, eg: orange -ignores ".git,.svn,dirs"
  3. If you want run command when file change, set -precmd eg: `orange -precmd "du -sh {0}"
  4. For PHP/Node.js/etc... , You can proxy your proxy, eg: proxy apache orange -portproxy 80
  5. If not port proxy, cd your dir, run orange , view a html file when current dir files change, browser will refresh automatically
  6. When start, Open("http://localhost"+ your port) in your Browser

Downloads

Binaries

Move orange file to your $PATH

If you have already installed the golang

go get -u http://github.com/wangxian/orange

THEN add your $GOPATH/bin to your $PATH

License

orange's code uses the MIT license, see our LICENSE file.

Documentation

Overview

Copyright 2013 The Authors. All rights reserved. Use of this source code is governed by a MIT license that can be found in the LICENSE file.

Run: go run defines.go orange.go --port 4000 --dir ../ --portproxy 80 --ignores .go -precmd "ls -lhr" INSTALL: go install

Project URL: https://github.com/wangxian/orange

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL