mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-07 04:46:25 +00:00
add build support for new IfcTester webapp
This commit is contained in:
committed by
Dion Moult
parent
5400712a7a
commit
be72887216
+3
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user