mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-22 19:05:56 -04:00
Add deployment configuration
This commit is contained in:
parent
56178f2b6c
commit
5eca8d03ae
3 changed files with 27 additions and 21 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -7,3 +7,8 @@ npm-*
|
|||
|
||||
# Build
|
||||
/build
|
||||
|
||||
# Elastic Beanstalk Files
|
||||
.elasticbeanstalk/*
|
||||
!.elasticbeanstalk/*.cfg.yml
|
||||
!.elasticbeanstalk/*.global.yml
|
||||
|
|
39
Makefile
39
Makefile
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue