Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
108 lines (89 loc) · 3.1 KB
/
Copy pathMakefile
File metadata and controls
108 lines (89 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# StyledConsole-Examples Makefile
# Runner for StyledConsole examples
# Requires: styledconsole package to be installed
.PHONY: help setup all auto fast list quickstart frames content effects banners advanced showcases applications testing v010 check
# Detect UV or fall back to pip
UV := $(shell command -v uv 2> /dev/null)
ifdef UV
INSTALL_CMD := uv pip install -e ../StyledConsole
SYNC_CMD := uv sync
else
INSTALL_CMD := pip install -e ../StyledConsole
SYNC_CMD := pip install -e .
endif
# Default target
help:
@echo "🎨 StyledConsole Examples Runner"
@echo "================================"
@echo "Setup:"
@echo " make setup Install styledconsole dependency"
@echo " make check Check if styledconsole is installed"
@echo ""
@echo "Run Examples:"
@echo " make all Run all examples (interactive)"
@echo " make auto Run all examples (auto mode)"
@echo " make fast Run all examples (skip testing)"
@echo " make list List available categories"
@echo ""
@echo "Run by Category:"
@echo " make quickstart Run 01_quickstart examples"
@echo " make frames Run 02_frames examples"
@echo " make content Run 03_content examples"
@echo " make effects Run 04_effects examples"
@echo " make banners Run 05_banners examples"
@echo " make advanced Run 06_advanced examples"
@echo " make showcases Run 07_showcases examples"
@echo " make applications Run 08_applications examples"
@echo " make testing Run 09_testing examples"
@echo " make v010 Run 10_v010_api examples"
@echo ""
@echo "Usage Tips:"
@echo " - Run 'make setup' first to install dependencies"
@echo " - Interactive mode pauses between examples"
@echo " - Auto mode runs continuously"
@echo " - Fast mode skips testing examples"
# Setup
setup:
@echo "📦 Installing StyledConsole..."
ifdef UV
@echo "Using uv for installation..."
@$(INSTALL_CMD)
else
@echo "Using pip for installation..."
@$(INSTALL_CMD)
endif
@echo "✅ Setup complete! You can now run examples."
check:
@echo "🔍 Checking if styledconsole is installed..."
@python -c "import styledconsole; print('✅ styledconsole', styledconsole.__version__, 'is installed')" 2>/dev/null || \
(echo "❌ styledconsole is not installed. Run 'make setup' to install it." && exit 1)
# Run all examples
all:
@python run_examples.py
auto:
@python run_examples.py --auto
fast:
@python run_examples.py --fast
list:
@python run_examples.py --list
# Run specific categories
quickstart:
@python run_examples.py --categories 01_quickstart
frames:
@python run_examples.py --categories 02_frames
content:
@python run_examples.py --categories 03_content
effects:
@python run_examples.py --categories 04_effects
banners:
@python run_examples.py --categories 05_banners
advanced:
@python run_examples.py --categories 06_advanced
showcases:
@python run_examples.py --categories 07_showcases
applications:
@python run_examples.py --categories 08_applications
testing:
@python run_examples.py --categories 09_testing
v010:
@python run_examples.py --categories 10_v010_api