-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (38 loc) · 1.79 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
41
42
43
44
45
46
47
48
49
50
51
52
CHANGELOG_TAG_URL_PREFIX := https://github.com/iconduit/webmanifest-loader/releases/tag/
JS_ARETHETYPESWRONG_REQ += artifacts/dist
JS_PUBLINT_REQ += artifacts/dist
JS_VITEST_REQ := artifacts/dist
-include .makefiles/Makefile
-include .makefiles/pkg/js/v1/Makefile
-include .makefiles/pkg/js/v1/with-npm.mk
-include .makefiles/pkg/js/v1/with-arethetypeswrong.mk
-include .makefiles/pkg/js/v1/with-publint.mk
-include .makefiles/pkg/js/v1/with-tsc.mk
-include .makefiles/pkg/changelog/v1/Makefile
.makefiles/%:
@curl -sfL https://makefiles.dev/v1 | bash /dev/stdin "$@"
################################################################################
.PHONY: precommit
precommit:: run-fixtures
.PHONY: ci
ci:: run-fixtures
################################################################################
VALID_FIXTURES := $(wildcard test/fixture/valid/*)
INVALID_FIXTURES := $(wildcard test/fixture/invalid/*)
.PHONY: run-fixtures
run-fixtures: run-fixtures-valid run-fixtures-invalid
.PHONY: run-fixtures-valid
run-fixtures-valid: $(addprefix run-fixture-valid-,$(notdir $(VALID_FIXTURES)))
.PHONY: run-fixtures-invalid
run-fixtures-invalid: $(addprefix run-fixture-invalid-,$(notdir $(INVALID_FIXTURES)))
.PHONY: run-fixture-valid-%
run-fixture-valid-%: artifacts/link-dependencies.touch artifacts/dist
FIXTURE="valid/$*" $(JS_EXEC) webpack --config test/webpack.config.js
.PHONY: run-fixture-invalid-%
run-fixture-invalid-%: artifacts/link-dependencies.touch artifacts/dist
if FIXTURE="invalid/$*" $(JS_EXEC) webpack --config test/webpack.config.js; then exit 1; else exit 0; fi
################################################################################
artifacts/dist: tsconfig.build.json tsconfig.json artifacts/link-dependencies.touch $(JS_SOURCE_FILES)
@rm -rf "$@"
$(JS_EXEC) tsc -p "$<"
@touch "$@"