Deprecate coco-brunch and coco-dev-server in favor of npm scripts

This commit is contained in:
Scott Erickson 2015-10-29 13:01:13 -07:00
parent 8cde8b2c20
commit 19185db63e
2 changed files with 12 additions and 28 deletions

View file

@ -1,17 +1,6 @@
#!/usr/bin/python echo
from subprocess import call echo "coco-brunch is deprecated." Instead, use:
import subprocess echo
import os echo "\"npm run brunch watch\" to run just brunch, or"
import time echo "\"npm run dev\" to run brunch and node in one terminal."
import sys echo
#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"
subprocess.Popen("ulimit -n 10000", shell=True)
while True:
print("Starting brunch. After the first compile, it'll keep running and watch for changes.")
call(brunch_path + " w",shell=True,cwd=coco_path)
print("Brunch crashed. Press control+C within 1 second to quit.")
time.sleep(1)

View file

@ -1,11 +1,6 @@
#!/usr/bin/python echo
from subprocess import call echo "coco-dev-server is deprecated." Instead, use:
import os echo
import sys echo "\"npm run nodemon\" to run just node, or"
#TODO: Upgrade this so it works on windows echo "\"npm run dev\" to run brunch and node in one terminal."
#These scripts will be placed in coco/bin echo
current_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
coco_path = os.getenv("COCO_DIR",os.path.join(current_directory,os.pardir))
nodemon_path = coco_path + os.sep + "node_modules" + os.sep + ".bin" + os.sep + "nodemon"
call(nodemon_path + " . --ext \".coffee|.js\" --watch server --watch server_config.js --watch server_setup.coffee --watch app" + os.sep + "schemas",shell=True,cwd=coco_path)