File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ ifeq ($(OS),Windows_NT)
1111PYTHON: =python
1212PIP: =pip
1313VENV_BIN: =Scripts
14- endif
14+ else
15+ UNAME_S: =$(shell uname -s)
1516ifeq ($(UNAME_S ) ,Darwin)
1617SED: =sed -i '' -e
1718PYTHON: =python3
1819endif
20+ endif
1921
2022VENV_ACTIVATE: =$(VENV_BIN ) /activate
2123
Original file line number Diff line number Diff line change 1919PACKAGE_NAME: =ifctester
2020include ../common.mk
2121
22+ NODE_ENV ?= production
23+ WEBAPP_DIR := webapp-next
24+ WEBAPP_BUILD_DIR := $(WEBAPP_DIR ) /dist
25+
26+ .PHONY : webapp-dev
27+ webapp-dev :
28+ cd $(WEBAPP_DIR ) && npm run dev
29+
30+ .PHONY : webapp-build
31+ webapp-build :
32+ cd $(WEBAPP_DIR ) && npm install
33+ cd $(WEBAPP_DIR ) && npm run build
34+
35+ .PHONY : webapp-serve
36+ webapp-serve : webapp-build
37+ cd $(WEBAPP_DIR ) && $(PYTHON ) serve.py
38+
39+ .PHONY : webapp-clean
40+ webapp-clean :
41+ rm -rf $(WEBAPP_BUILD_DIR )
42+ rm -rf $(WEBAPP_DIR ) /node_modules
43+
44+ .PHONY : dist
45+ dist : webapp-prepare
46+ $(MAKE ) -f ../common.mk dist PACKAGE_NAME=$(PACKAGE_NAME )
47+
48+ .PHONY : webapp-prepare
49+ webapp-prepare : webapp-build
50+ rm -rf $(PACKAGE_NAME ) /webapp/www/*
51+ mkdir -p $(PACKAGE_NAME ) /webapp/www
52+ cp -r $(WEBAPP_BUILD_DIR ) /* $(PACKAGE_NAME ) /webapp/www/
53+ cp $(WEBAPP_DIR ) /serve.py $(PACKAGE_NAME ) /webapp/serve.py
54+
2255.PHONY : test
2356test :
2457 pytest -p no:pytest-blender test
You can’t perform that action at this time.
0 commit comments