-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (36 loc) · 1.39 KB
/
Copy pathMakefile
File metadata and controls
49 lines (36 loc) · 1.39 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
# Makefile
.PHONY: help catalog install dev dev-study build preview test typecheck clean stills
.DEFAULT_GOAL := help
STUDY ?= intent-cascade
LAB_DIR := products/lab
PROJECT ?=
help: ## 显示帮助信息
@echo "LightUI workspace commands"
@echo ""
@echo "STUDY=$(STUDY)"
@echo ""
@echo "Available commands:"
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-16s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
catalog: ## 从 studies/*/study.json 生成 docs/catalog.md
node scripts/sync-catalog.mjs
@sed -n '1,80p' docs/catalog.md
install: ## 安装 lab 与全部 study 的依赖(npm workspaces)
npm install
dev: ## 启动 lab(可呈现目录,默认入口)
npm run dev -w @lightui/lab
dev-study: ## 启动指定 study 的独立 playground
npm run dev -w @lightui/$(STUDY)
build: ## 构建 lab 与全部 study
npm run build --workspaces --if-present
preview: ## 预览 lab 构建产物
npm run preview -w @lightui/lab
test: ## 运行全部 workspace 测试
npm run test --workspaces --if-present
typecheck: ## 类型检查全部 workspace
npm run typecheck --workspaces --if-present
stills: ## 从本仓库舞台导出 references 静帧
python3 scripts/capture-stage.py $(if $(PROJECT),--project $(PROJECT),)
clean: ## 清理构建缓存
@find products studies -type d \( -name dist -o -name .cache \) -exec rm -rf {} +
@find . -name '.DS_Store' -delete
@echo "Cleaning completed."