-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b00ea9
commit bd281a0
Showing
2 changed files
with
68 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright DB InfraGO AG and contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CAPELLA_MODEL_EXPLORER_HOST_IP ?= 127.0.0.1 | ||
CAPELLA_MODEL_EXPLORER_PORT ?= 8000 | ||
MODEL ?= coffee-machine | ||
|
||
.PHONY: help | ||
help: | ||
@echo 'Available make targets:' | ||
@echo '' | ||
@echo ' run MODEL=/some/model.aird' | ||
@echo ' -- Run the backend with a model' | ||
@echo ' build-frontend -- Build the prod frontend files' | ||
@echo ' dev-frontend -- Run the frontend in dev mode' | ||
@echo ' storybook -- Run storybook for frontend development' | ||
|
||
.PHONY: build-frontend | ||
build-frontend: frontend/node_modules | ||
cd frontend && npm run build | ||
|
||
.PHONY: run | ||
run: frontend/dist/static/env.js | ||
sed -i "s|__ROUTE_PREFIX__||g" frontend/dist/static/env.js | ||
MODE=production python frontend/fetch-version.py | ||
python -c "from capellambse_context_diagrams import install_elk; install_elk()" | ||
MODE=production python -m capella_model_explorer.backend $(MODEL) ./templates | ||
|
||
.PHONY: dev-frontend | ||
dev-frontend: frontend/node_modules | ||
cd frontend && npm run dev | ||
|
||
.PHONY: storybook | ||
storybook: frontend/node_modules | ||
cd frontend && npm run storybook | ||
|
||
frontend/node_modules: frontend/package-lock.json | ||
cd frontend && npm install | ||
|
||
frontend/dist/static/env.js: build-frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters