Skip to content

Commit ce6b025

Browse files
build: embed React Studio UI, Makefile blocks targets, gitignore update
## Embedded UI - Copied web/dist React Studio build into cmd/slmcode/ui/ for go:embed - React Studio now served via slmcode studio (includes BlockManager, PackSelector, enhanced PipelineEditor, active indicators) - Kept legacy app.jsx and styles.css for backward compat ## Makefile - Added blocks-list, blocks-validate, blocks-show, blocks-apply-(go|python|react) targets - Added ui-react target: builds React app and syncs to embed directory - Added blocks section to help output ## Config - .gitignore: added *.js.map pattern
1 parent 9fe6f6b commit ce6b025

5 files changed

Lines changed: 407 additions & 46 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ site/
88
web/node_modules/
99
web/dist/
1010
web/tsconfig.tsbuildinfo
11+
*.js.map
1112
.env
1213
.env.*
1314
.env.local

‎Makefile‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ stack ?= omlx-local
2424
# ── Stack management ──
2525
.PHONY: stack-list stack-show stack-apply stack-edit stack-new
2626

27+
# ── Block management ──
28+
.PHONY: blocks-list blocks-validate blocks-show blocks-apply-go blocks-apply-python blocks-apply-react
29+
2730
help: ## Show this help
2831
@echo "SLMCode Makefile — v$(VERSION)"
2932
@echo ""
@@ -47,6 +50,14 @@ help: ## Show this help
4750
@echo ""
4851
@echo " Available stacks: $(shell ls $(STACKS_DIR)/*.yaml 2>/dev/null | xargs -n1 basename | sed 's/.yaml//' | tr '\n' ' ')"
4952
@echo ""
53+
@echo " Block commands:"
54+
@echo " make blocks-list List all building blocks"
55+
@echo " make blocks-validate Validate all block YAML configs"
56+
@echo " make blocks-show kind=pipeline id=go Show a block"
57+
@echo " make blocks-apply-go Apply Go language pack"
58+
@echo " make blocks-apply-python Apply Python language pack"
59+
@echo " make blocks-apply-react Apply React/TS language pack"
60+
@echo ""
5061
@echo " Docs:"
5162
@echo " make docs-build Build MkDocs site"
5263
@echo " make docs-serve Serve docs locally"
@@ -121,6 +132,52 @@ stack-new:
121132
@echo "✔ Created stack '$(name)' at stacks/$(name).yaml"
122133
@echo " Edit: make stack-edit stack=$(name)"
123134

135+
# ── Blocks: list all building blocks ──
136+
blocks-list:
137+
@if [ -x ./bin/slmcode ]; then ./bin/slmcode blocks list; \
138+
elif command -v slmcode >/dev/null 2>&1; then slmcode blocks list; \
139+
else echo "Run: make build && ./bin/slmcode blocks list"; exit 1; fi
140+
141+
# ── Blocks: validate all YAML configs ──
142+
blocks-validate:
143+
@if [ -x ./bin/slmcode ]; then ./bin/slmcode blocks validate; \
144+
elif command -v slmcode >/dev/null 2>&1; then slmcode blocks validate; \
145+
else echo "Run: make build && ./bin/slmcode blocks validate"; exit 1; fi
146+
147+
# ── Blocks: show a specific block ──
148+
# Usage: make blocks-show kind=pipeline id=go
149+
kind ?= pipeline
150+
id ?= go
151+
blocks-show:
152+
@if [ -x ./bin/slmcode ]; then ./bin/slmcode blocks show $(kind) $(id); \
153+
elif command -v slmcode >/dev/null 2>&1; then slmcode blocks show $(kind) $(id); \
154+
else echo "Run: make build"; exit 1; fi
155+
156+
# ── Blocks: apply language packs ──
157+
blocks-apply-go:
158+
@if [ -x ./bin/slmcode ]; then ./bin/slmcode blocks apply go; \
159+
elif command -v slmcode >/dev/null 2>&1; then slmcode blocks apply go; \
160+
else echo "Run: make build"; exit 1; fi
161+
162+
blocks-apply-python:
163+
@if [ -x ./bin/slmcode ]; then ./bin/slmcode blocks apply python; \
164+
elif command -v slmcode >/dev/null 2>&1; then slmcode blocks apply python; \
165+
else echo "Run: make build"; exit 1; fi
166+
167+
blocks-apply-react:
168+
@if [ -x ./bin/slmcode ]; then ./bin/slmcode blocks apply react; \
169+
elif command -v slmcode >/dev/null 2>&1; then slmcode blocks apply react; \
170+
else echo "Run: make build"; exit 1; fi
171+
172+
# ── UI: build React Studio and update embedded UI ──
173+
ui-react: ## Build React/Vite Studio UI and sync to embed directory
174+
@echo "Building React Studio UI..."
175+
cd web && npm run build
176+
@echo "Syncing to embed directory..."
177+
rm -rf cmd/slmcode/ui/assets cmd/slmcode/ui/vendor
178+
cp -r web/dist/* cmd/slmcode/ui/
179+
@echo "✔ React Studio UI synced to cmd/slmcode/ui/"
180+
124181
tidy: ## Tidy Go modules
125182
go mod tidy
126183

‎cmd/slmcode/ui/assets/index-B04EUJVt.css‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)