-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
79 lines (59 loc) · 2.07 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
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
SHELL:=$(PREFIX)/bin/sh
build: \
generated/npm \
rebuild: \
clean build
clean: \
rm -f packages/npm/jns42-core/bin/main.wasm
rm -rf generated
rm -rf target
generated/npm: \
generated/npm/schema-draft-04 \
generated/npm/schema-draft-2020-12 \
generated/npm/schema-oas-v3-1 \
generated/npm/swagger-v2 \
generated/npm/oas-v3-0 \
generated/npm/oas-v3-1 \
npm run build --workspaces
# Link the generated code, but don't save those links to the package lock
npm install --no-package-lock
generated/npm/schema-draft-04:
mkdir -p $(@D)
npx jns42-generator package http://json-schema.org/draft-04/schema\# \
--package-directory $@ \
--package-name @jns42/$(notdir $(basename $@)) \
--package-version $(shell npx jns42-generator --version) \
generated/npm/schema-draft-2020-12:
mkdir -p $(@D)
npx jns42-generator package https://json-schema.org/draft/2020-12/schema \
--package-directory $@ \
--package-name @jns42/$(notdir $(basename $@)) \
--package-version $(shell npx jns42-generator --version) \
generated/npm/schema-oas-v3-1:
mkdir -p $(@D)
npx jns42-generator package https://spec.openapis.org/oas/3.1/dialect/base \
--package-directory $@ \
--package-name @jns42/$(notdir $(basename $@)) \
--package-version $(shell npx jns42-generator --version) \
generated/npm/swagger-v2:
mkdir -p $(@D)
npx jns42-generator package http://swagger.io/v2/schema.json\# \
--package-directory $@ \
--package-name @jns42/$(notdir $(basename $@)) \
--package-version $(shell npx jns42-generator --version) \
generated/npm/oas-v3-0:
mkdir -p $(@D)
npx jns42-generator package https://spec.openapis.org/oas/3.0/schema/2021-09-28 \
--package-directory $@ \
--package-name @jns42/$(notdir $(basename $@)) \
--package-version $(shell npx jns42-generator --version) \
generated/npm/oas-v3-1:
mkdir -p $(@D)
npx jns42-generator package https://spec.openapis.org/oas/3.1/schema/2022-10-07 \
--package-directory $@ \
--package-name @jns42/$(notdir $(basename $@)) \
--package-version $(shell npx jns42-generator --version) \
.PHONY: \
build \
rebuild \
clean \