add build support for new IfcTester webapp

This commit is contained in:
Sayan Jyoti Das
2025-08-28 12:13:14 +05:30
committed by Dion Moult
parent 5400712a7a
commit be72887216
2 changed files with 36 additions and 1 deletions
+3 -1
View File
@@ -11,11 +11,13 @@ ifeq ($(OS),Windows_NT)
PYTHON:=python
PIP:=pip
VENV_BIN:=Scripts
endif
else
UNAME_S:=$(shell uname -s)
ifeq ($(UNAME_S),Darwin)
SED:=sed -i '' -e
PYTHON:=python3
endif
endif
VENV_ACTIVATE:=$(VENV_BIN)/activate
+33
View File
@@ -19,6 +19,39 @@
PACKAGE_NAME:=ifctester
include ../common.mk
NODE_ENV ?= production
WEBAPP_DIR := webapp-next
WEBAPP_BUILD_DIR := $(WEBAPP_DIR)/dist
.PHONY: webapp-dev
webapp-dev:
cd $(WEBAPP_DIR) && npm run dev
.PHONY: webapp-build
webapp-build:
cd $(WEBAPP_DIR) && npm install
cd $(WEBAPP_DIR) && npm run build
.PHONY: webapp-serve
webapp-serve: webapp-build
cd $(WEBAPP_DIR) && $(PYTHON) serve.py
.PHONY: webapp-clean
webapp-clean:
rm -rf $(WEBAPP_BUILD_DIR)
rm -rf $(WEBAPP_DIR)/node_modules
.PHONY: dist
dist: webapp-prepare
$(MAKE) -f ../common.mk dist PACKAGE_NAME=$(PACKAGE_NAME)
.PHONY: webapp-prepare
webapp-prepare: webapp-build
rm -rf $(PACKAGE_NAME)/webapp/www/*
mkdir -p $(PACKAGE_NAME)/webapp/www
cp -r $(WEBAPP_BUILD_DIR)/* $(PACKAGE_NAME)/webapp/www/
cp $(WEBAPP_DIR)/serve.py $(PACKAGE_NAME)/webapp/serve.py
.PHONY: test
test:
pytest -p no:pytest-blender test