-
Notifications
You must be signed in to change notification settings - Fork 0
0.1.0 dev #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
0.1.0 dev #2
Changes from all commits
22142e3
27da450
e4bcedf
0d34673
7bc8c27
9250ddb
cf43497
cf7d392
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| .PHONY: all build clean | ||
|
|
||
| all: build | ||
|
|
||
| TEMP_DIR = build | ||
|
|
||
| PYPROJECT = pyproject.toml | ||
|
|
||
|
|
||
| BUILD_DIR = modular_server_manager_web_client/ | ||
| WEB_BUILD_DIR = $(BUILD_DIR)client | ||
|
|
||
| PYTHON_PATH = $(shell if [ -d env/bin ]; then echo "env/bin/"; elif [ -d env/Scripts ]; then echo "env/Scripts/"; else echo ""; fi) | ||
| PYTHON_LIB = $(shell find env/lib -type d -name "site-packages" | head -n 1; if [ -d env/Lib/site-packages ]; then echo "env/Lib/site-packages/"; fi) | ||
| PYTHON = $(PYTHON_PATH)python | ||
|
|
||
| EXECUTABLE_EXTENSION = $(shell if [ -d env/bin ]; then echo ""; elif [ -d env/Scripts ]; then echo ".exe"; else echo ""; fi) | ||
| APP_EXECUTABLE = $(PYTHON_PATH)modular-server-manager$(EXECUTABLE_EXTENSION) | ||
|
|
||
| INSTAL_PATH = $(PYTHON_LIB)/modular_server_manager_web_client | ||
|
|
||
| # if not defined, get the version from git | ||
| VERSION ?= $(shell $(PYTHON) get_version.py) | ||
|
|
||
| # if version is in the form of x.y.z-dev-aaaa or x.y.z-dev+aaaa, set it to x.y.z-dev | ||
| VERSION_STR = $(shell echo $(VERSION) | sed "s/-dev-[a-z0-9]*//; s/-dev+.*//") | ||
|
|
||
| WHEEL = modular_server_manager_web_client-$(VERSION_STR)-py3-none-any.whl | ||
| ARCHIVE = modular_server_manager_web_client-$(VERSION_STR).tar.gz | ||
|
|
||
| # SRV_SRC_DIR = src/server/ | ||
| # SRV_SRC = $(shell find $(SRV_SRC_DIR) -type f -name "*.py") $(SRV_SRC_DIR)compatibility.json | ||
| # SRV_DIST = $(patsubst $(SRV_SRC_DIR)%,$(BUILD_DIR)%,$(SRV_SRC)) | ||
|
|
||
| WEB_SRC_DIR = src/ | ||
| WEB_SRC = $(shell find $(WEB_SRC_DIR) -type f -name "*.html" -o -name "*.scss" -o -name "*.ts") | ||
| WEB_DIST = $(WEB_BUILD_DIR)/index.html $(WEB_BUILD_DIR)/assets/css/main.css $(WEB_BUILD_DIR)/assets/app.js | ||
|
|
||
|
|
||
| print-%: | ||
| @echo $* = $($*) | ||
|
|
||
| dist: | ||
| mkdir -p dist | ||
|
|
||
| # dist/$(WHEEL): $(WEB_DIST) # $(SRV_DIST) $(PYPROJECT) $(PYTHON_LIB)/build dist | ||
| # mkdir -p $(TEMP_DIR) | ||
| # $(PYTHON) -m build --outdir $(TEMP_DIR) --wheel | ||
| # mkdir -p dist | ||
| # mv $(TEMP_DIR)/*.whl dist/$(WHEEL) | ||
| # rm -rf $(TEMP_DIR) | ||
| # @echo "Building wheel package complete." | ||
|
|
||
| # dist/$(ARCHIVE): $(WEB_DIST) # $(SRV_DIST) $(PYPROJECT) $(PYTHON_LIB)/build dist | ||
| # mkdir -p $(TEMP_DIR) | ||
| # $(PYTHON) build_package.py --outdir $(TEMP_DIR) --sdist --version $(VERSION_STR) | ||
| # mkdir -p dist | ||
| # mv $(TEMP_DIR)/*.tar.gz dist/$(ARCHIVE) | ||
| # rm -rf $(TEMP_DIR) | ||
| # @echo "Building archive package complete." | ||
|
|
||
| $(WEB_DIST): $(WEB_SRC) | ||
| npm run build | ||
|
|
||
| $(BUILD_DIR)%: $(SRV_SRC_DIR)% | ||
| @mkdir -p $(@D) | ||
| @echo "Copying $< to $@" | ||
| @cp $< $@ | ||
|
|
||
|
|
||
| $(INSTAL_PATH) : dist/$(WHEEL) | ||
| @echo "Installing package..." | ||
| @$(PYTHON) -m pip install --upgrade --force-reinstall dist/$(WHEEL) | ||
| @echo "Package installed." | ||
|
|
||
|
|
||
| web: $(WEB_DIST) | ||
|
|
||
|
|
||
| build: dist/$(WHEEL) dist/$(ARCHIVE) | ||
|
|
||
| install: $(INSTAL_PATH) | ||
|
|
||
| start: install | ||
| @$(APP_EXECUTABLE) \ | ||
| -c /var/minecraft/config.json \ | ||
| --log-file server.trace.log:TRACE \ | ||
| --log-file server.debug.log:DEBUG | ||
|
|
||
|
|
||
| clean: | ||
| rm -rf $(BUILD_DIR) | ||
| rm -rf dist | ||
| rm -rf $(PYTHON_LIB)/modular_server_manager_web_client | ||
| rm -rf $(PYTHON_LIB)/modular_server_manager_web_client-*.dist-info | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| * { | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| html, body { | ||
| height: 100%; | ||
| margin: 0; | ||
| font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; | ||
| background: linear-gradient(180deg, #0f172a 0%, rgb(6.9473684211, 10.6526315789, 19.4526315789) 100%); | ||
| color: #e6eef8; | ||
| } | ||
|
|
||
| #app { | ||
| max-width: 900px; | ||
| margin: 6rem auto; | ||
| padding: 2rem; | ||
| background: rgba(255, 255, 255, 0.03); | ||
| border-radius: 10px; | ||
| box-shadow: 0 6px 24px rgba(2, 6, 23, 0.6); | ||
| } | ||
|
|
||
| h1 { | ||
| margin: 0 0 0.5rem 0; | ||
| color: #60a5fa; | ||
| } | ||
|
|
||
| p { | ||
| color: #93c5fd; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <title>Web Client — TypeScript + SCSS</title> | ||
| <link rel="stylesheet" href="assets/css/main.css" /> | ||
| </head> | ||
| <body> | ||
| <div id="header"> | ||
| </div> | ||
| <div id="app"> | ||
| </div> | ||
|
|
||
| <!-- esbuild will produce assets/app.js during dev or build --> | ||
| <script type="module" src="assets/app.js"></script> | ||
| </body> | ||
| </html> |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,12 +2,12 @@ | |||||
| "name": "web-client", | ||||||
| "version": "0.1.0", | ||||||
| "private": true, | ||||||
| "description": "Web client (TypeScript + SCSS + SCSS + HTML) — lightweight build using esbuild and sass", | ||||||
| "description": "Web modular_server_manager_web_client/client (TypeScript + SCSS + SCSS + HTML) — lightweight build using esbuild and sass", | ||||||
|
||||||
| "description": "Web modular_server_manager_web_client/client (TypeScript + SCSS + SCSS + HTML) — lightweight build using esbuild and sass", | |
| "description": "Web client for Modular Server Manager (TypeScript + SCSS + HTML) — lightweight build using esbuild and sass", |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The glob pattern is missing a forward slash. It should be "src/web//*.{ts,scss,html}" instead of "src/web/*.{ts,scss,html}". Without the slash, the pattern may not correctly match files in the src/web directory and its subdirectories.
| "format": "prettier --write \"src/web**/*.{ts,scss,html}\"" | |
| "format": "prettier --write \"src/web/**/*.{ts,scss,html}\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name contains a spelling error: "INSTAL_PATH" should be "INSTALL_PATH".