-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
71 lines (55 loc) · 2.48 KB
/
makefile
File metadata and controls
71 lines (55 loc) · 2.48 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
# CodeExpander Plugins - Common Commands
# Usage: make <target> [PLUGIN=<name>]
# Install all dependencies
install:
@pnpm install
# Start dev server for a plugin (interactive if PLUGIN is not set)
# Usage: make dev PLUGIN=plugin-text
dev:
@bash "$(PWD)/scripts/select-plugin-dev.sh" $(PLUGIN)
# Build all plugins
build:
@pnpm run build:plugins
# Build third-party plugins (interactive if PLUGIN is not set)
# Usage: make build-third-party PLUGIN=blockbench,drawio
build-third-party:
@node "$(PWD)/scripts/build-third-party-plugins.mjs" $(if $(PLUGIN),--plugin=$(PLUGIN)) --force
# List all third-party plugins
list-third-party:
@node "$(PWD)/scripts/build-third-party-plugins.mjs" --list
# Publish plugins in plugins/ (interactive, or specify with PLUGIN=)
# Usage: make publish-plugins PLUGIN=text
publish-plugins:
@node "$(PWD)/scripts/publish-plugins.mjs" --scope=plugins $(if $(PLUGIN),--plugin=$(PLUGIN))
# Publish plugins in third-party/ (interactive, or specify with PLUGIN=)
# Usage: make publish-third-party PLUGIN=drawio
publish-third-party:
@node "$(PWD)/scripts/publish-plugins.mjs" --scope=third-party $(if $(PLUGIN),--plugin=$(PLUGIN))
# List publishable plugins in plugins/
list-plugins:
@node "$(PWD)/scripts/publish-plugins.mjs" --scope=plugins --list
# List publishable plugins in third-party/
list-third-party-plugins:
@node "$(PWD)/scripts/publish-plugins.mjs" --scope=third-party --list
# Update git submodules (init & sync)
# Usage: make update-submodules # init/fetch submodules
# make update-submodules REMOTE=1 # update to latest remote
# make update-submodules DEPTH=1 # shallow clone (depth 1)
update-submodules:
@git submodule update --init --recursive $(if $(DEPTH),--depth $(DEPTH)) $(if $(REMOTE),--remote)
# Bump patch version for all plugins
version:
@pnpm --filter './plugins/*' --filter './examples/*' --filter './third-party/*' exec -- npm version patch --no-git-tag-version
# Run linter across all packages
lint:
@pnpm -r run lint 2>/dev/null || true
# Clean dist folders for all plugins
clean:
@pnpm --filter './plugins/*' --filter './examples/*' --filter './third-party/*' exec -- rm -rf dist
# Create a new plugin (interactive)
create:
@pnpm run create
# Run tests (if available)
test:
@pnpm -r run test 2>/dev/null || echo "No tests found"
.PHONY: install dev build build-third-party list-third-party publish publish-plugins publish-third-party publish-plugin list-plugins list-third-party-plugins update-submodules version lint clean create test