Add deployment configuration

This commit is contained in:
Andrew Sliwinski 2015-09-09 13:24:50 -07:00
parent 56178f2b6c
commit 5eca8d03ae
3 changed files with 27 additions and 21 deletions

5
.gitignore vendored
View file

@ -7,3 +7,8 @@ npm-*
# Build
/build
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml

View file

@ -17,15 +17,30 @@ clean:
static:
cp -a ./static/. ./build/
nginx_conf:
@make static
node server/nginx.js
webpack:
$(WEBPACK)
# ------------------------------------
watch:
$(WATCH) "make clean && make static" ./static &
$(WEBPACK) -d --watch &
wait
stop:
pkill -f "node $(WEBPACK) -d --watch"
pkill -f "node $(WATCH) make clean && make static ./static"
start:
$(NODE) ./server/index.js
# ------------------------------------
nginx_conf:
node server/nginx.js
# ------------------------------------
test:
@make lint
@ -39,18 +54,4 @@ lint:
# ------------------------------------
watch:
$(WATCH) "make clean && make static" ./static &
$(WEBPACK) -d --watch &
wait
stop-watch:
pkill -f "node $(WATCH) make clean && make static ./static"
pkill -f "node $(WEBPACK) -d --watch"
start:
$(NODE) ./server/index.js
# ------------------------------------
.PHONY: build clean static webpack test lint watch start
.PHONY: build clean static webpack watch stop start nginx_conf test lint

View file

@ -2,13 +2,13 @@
"name": "www",
"version": "1.0.0",
"description": "Standalone WWW client for Scratch",
"main": "index.js",
"scripts": {
"start": "make start",
"test": "make test",
"watch": "make watch",
"stop-watch": "make stop-watch",
"build": "make build"
"build": "make build",
"prestart": "make build"
},
"repository": {
"type": "git",