WIP: By using new transcrypt, we have better simpler make all
Also bundling without separate js file
This commit is contained in:
parent
b37290d733
commit
e62813420e
|
@ -4,6 +4,9 @@ RES_FOLDER=$(CURDIR)/../res
|
||||||
TS_BUILD=tsbuild
|
TS_BUILD=tsbuild
|
||||||
TS_FLAGS=-da -n -m -od ../build/$(TS_BUILD) # has to be relative for some reason
|
TS_FLAGS=-da -n -m -od ../build/$(TS_BUILD) # has to be relative for some reason
|
||||||
|
|
||||||
|
BR_FLAGS=-p esmify --debug
|
||||||
|
LESS_FLAGS=--include-path=../node_modules/picnic
|
||||||
|
|
||||||
LESS_FILE=$(RES_FOLDER)/main.less
|
LESS_FILE=$(RES_FOLDER)/main.less
|
||||||
PY_FILE=$(SRC_FOLDER)/main.py
|
PY_FILE=$(SRC_FOLDER)/main.py
|
||||||
HTML_FILE=$(RES_FOLDER)/main.html
|
HTML_FILE=$(RES_FOLDER)/main.html
|
||||||
|
@ -14,28 +17,26 @@ HTML_FILE=$(RES_FOLDER)/main.html
|
||||||
# mypy:
|
# mypy:
|
||||||
# mypy src/main.py
|
# mypy src/main.py
|
||||||
|
|
||||||
all: main.css bundle.js main.html
|
all: main.css bundle.js index.html
|
||||||
|
|
||||||
transcrypt: $(PY_FILE) $(TS_BUILD)
|
transcrypt: $(PY_FILE) $(TS_BUILD)
|
||||||
# ln -s $(TS_BUILD) $(SRC_FOLDER)/__target__
|
|
||||||
transcrypt $(TS_FLAGS) $<
|
transcrypt $(TS_FLAGS) $<
|
||||||
# rm $(SRC_FOLDER)/__target__
|
|
||||||
|
|
||||||
bundle.js: transcrypt
|
bundle.js: transcrypt
|
||||||
node browserify.js $(TS_BUILD)/main.js > bundle.js
|
cd ..; browserify $(BR_FLAGS) build/$(TS_BUILD)/main.js -o build/bundle.js
|
||||||
|
|
||||||
main.css: $(LESS_FILE)
|
main.css: $(LESS_FILE)
|
||||||
lessc $< > $@
|
lessc $(LESS_FLAGS) $< > $@
|
||||||
|
|
||||||
$(TS_BUILD):
|
$(TS_BUILD):
|
||||||
mkdir -p $(TS_BUILD)
|
mkdir -p $(TS_BUILD)
|
||||||
|
|
||||||
main.html: $(HTML_FILE)
|
index.html: $(HTML_FILE)
|
||||||
cp $(RES_FOLDER)/main.html ./
|
cp $(RES_FOLDER)/main.html $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -r $(TS_BUILD)
|
rm -fr $(TS_BUILD)
|
||||||
rm bundle.js main.html main.css
|
rm -f bundle.js index.html main.css
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user