-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
40 lines (35 loc) · 1.04 KB
/
Makefile
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
TOOL = scripts/swift-run.sh
PACKAGE = swift package -c release --package-path Tools
SWIFT_FILE_PATHS = Package.swift Tools/Package.swift Sources Tests Examples Benchmarks
XCODEGEN = SWIFT_PACKAGE_RESOURCES=Tools/.build/checkouts/XcodeGen/SettingPresets $(TOOL) xcodegen
SWIFTFORMAT = $(TOOL) swift-format
.PHONY: proj
proj:
$(XCODEGEN) -s Examples/project.yml
$(XCODEGEN) -s Benchmarks/project.yml
.PHONY: format
format:
$(SWIFTFORMAT) format -i -p -r $(SWIFT_FILE_PATHS)
.PHONY: lint
lint:
$(SWIFTFORMAT) lint -s -p -r $(SWIFT_FILE_PATHS)
.PHONY: docs
docs:
$(PACKAGE) \
--allow-writing-to-directory docs \
generate-documentation \
--include-extended-types \
--experimental-skip-synthesized-symbols \
--product Atoms \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path swiftui-atom-properties \
--output-path docs
.PHONY: docs-preview
docs-preview:
$(PACKAGE) \
--disable-sandbox \
preview-documentation \
--include-extended-types \
--experimental-skip-synthesized-symbols \
--product Atoms