created make release target with optimizations

This commit is contained in:
Ozbolt Menegatti 2020-01-25 21:43:21 +01:00
parent 4fb17bb2fc
commit 1f829386d2
2 changed files with 11 additions and 6 deletions

View File

@ -1,11 +1,12 @@
.PHONY: all release build transcrypt copy $(RES_LESS_FILE) $(RES_PY_FILE) $(RES_HTML_FILE) $(RES_XML_FILE)
SRC_FOLDER=$(CURDIR)/../src
RES_FOLDER=$(CURDIR)/../res
TS_BUILD=tsbuild
TS_FLAGS=-da -n -m -od ../build/$(TS_BUILD) # has to be relative for some reason
BR_FLAGS=-p esmify -t brfs --debug
LESS_FLAGS=--include-path=../node_modules/picnic
BR_FLAGS=-p esmify -t brfs
CSS_FILE=main.css
LESS_FILE=main.less
@ -18,11 +19,15 @@ RES_PY_FILE=$(SRC_FOLDER)/$(PY_FILE)
RES_HTML_FILE=$(RES_FOLDER)/$(HTML_FILE)
RES_XML_FILE=$(RES_FOLDER)/$(XML_FILE)
.DEFAULT_GOAL := all
.PHONY: all transcrypt copy $(RES_LESS_FILE) $(RES_PY_FILE) $(RES_HTML_FILE) $(RES_XML_FILE)
all: BR_FLAGS := $(BR_FLAGS) --debug
release: BR_FLAGS := $(BR_FLAGS) -p tinyify
release: build
all: build
all: copy $(CSS_FILE) bundle.js local.js
build: copy $(CSS_FILE) bundle.js local.js
transcrypt: $(RES_PY_FILE) $(TS_BUILD)
transcrypt $(TS_FLAGS) $<

View File

@ -8,11 +8,11 @@
"author": "Ozbolt Menegatti",
"license": "MPL2",
"devDependencies": {
"brfs": "^2.0.2",
"browserify": "^16.5.0",
"esmify": "^2.1.1",
"picnic": "^6.5.2",
"snabbdom": "^0.7.4",
"tinyify": "^2.5.2",
"brfs": "^2.0.2"
"tinyify": "^2.5.2"
}
}