2014-01-03 20:07:54 -05:00
|
|
|
#!/usr/bin/python
|
|
|
|
from subprocess import call
|
|
|
|
import subprocess
|
|
|
|
import os
|
|
|
|
import time
|
|
|
|
import sys
|
|
|
|
#TODO: Upgrade this so it works on windows
|
|
|
|
#These scripts will be placed in coco/bin
|
|
|
|
current_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
|
|
|
|
coco_path = os.getenv("COCO_DIR",os.path.join(current_directory,os.pardir))
|
|
|
|
brunch_path = coco_path + os.sep + "node_modules" + os.sep + ".bin" + os.sep + "brunch"
|
2014-08-14 18:09:10 -04:00
|
|
|
subprocess.Popen("ulimit -n 10000", shell=True)
|
2014-01-03 20:07:54 -05:00
|
|
|
while True:
|
2014-02-19 20:02:39 -05:00
|
|
|
print("Starting brunch. After the first compile, it'll keep running and watch for changes.")
|
2014-01-10 18:51:26 -05:00
|
|
|
call(brunch_path + " w",shell=True,cwd=coco_path)
|
2014-01-03 20:07:54 -05:00
|
|
|
print("Brunch crashed. Press control+C within 1 second to quit.")
|
|
|
|
time.sleep(1)
|