-
Notifications
You must be signed in to change notification settings - Fork 42
/
dune
139 lines (126 loc) · 2.73 KB
/
dune
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
(env
(dev (flags :standard -rectypes))
(release (flags :standard -rectypes -w +27+32)))
(rule
(targets (dir coq-pkgs))
(mode (promote (until-clean)))
(deps
(package coq-core)
(package coq-stdlib)
Makefile)
(action
(progn
(run
node
%{dep:dist-pkg}/mk-pkg.cjs
%{dep:etc/pkg-metadata/coq-pkgs.json}
--rootdir %{env:COQBUILDDIR_REL=????}
--nostdlib))))
; building symbols using Make because Dune has no pattern rules T.T
; (run make libs-symb))))
(rule
(targets (dir node_modules))
(mode (promote (until-clean)))
(deps
package.json
package-lock.json)
(action
(run npm install --no-progress --no-save)))
(alias
(name jscoq-static)
(deps
(source_tree frontend)
(source_tree backend)
(source_tree examples)
index.html
jscoq.install))
(alias
(name jscoq)
(deps
(alias shared)
backend/jsoo/jscoq_worker.bc.js))
(alias
(name wacoq)
(deps
(alias shared)
backend/wasm/wacoq_worker.bc
(glob_files backend/wasm/*.wasm)))
(alias
(name shared)
(deps
(source_tree examples)
(source_tree docs) ; for `quick-help.html`
dist
jscoq.js
; Disabled in the lsp / esbuild branch
; dist-webpack
index.html
coq-pkgs))
; JavaScript build (esbuild)
(rule
(targets (dir dist))
(mode (promote (until-clean)))
(deps
(glob_files backend/*.js)
(glob_files backend/*.ts)
(source_tree backend/wasm)
(source_tree frontend)
vendor/coq-lsp/editor/code/tsconfig-base.json
(source_tree vendor/coq-lsp/editor/code/lib)
(source_tree vendor/coq-lsp/editor/code/views/info)
tsconfig.json
esbuild.mjs
node_modules)
(action
; Set JSCOQ_BUNDLE_TARGET=release to generate minimized dist files
(progn
(run npm run %{env:JSCOQ_BUNDLE_TARGET=esbuild})
(run cp -a frontend/views/info/iframe.html dist/frontend/info-view))))
(rule
(targets (dir dist-pkg))
(mode (promote (until-clean)))
(deps
etc/pkg-metadata/coq-pkgs.json
(source_tree backend)
(source_tree frontend)
tsconfig.json
esbuild-pkg.mjs
node_modules)
(action
(run npm run esbuild-pkg)))
(rule
(targets (dir dist-cli))
(mode (promote (until-clean)))
(deps
backend/jsoo/jscoq_worker.bc.js
etc/pkg-metadata/coq-pkgs.json
(source_tree backend)
(source_tree frontend)
tsconfig.json
esbuild-cli.mjs
node_modules)
(action
(run npm run esbuild-cli)))
; Webpack build (legacy)
(rule
(targets (dir dist-webpack))
(mode (promote (until-clean)))
(deps
(source_tree backend)
(source_tree frontend)
tsconfig.json
webpack.config.js
node_modules)
(action
(run npm run webpack)))
; Just the worker
(alias
(name jscoq_worker)
(deps
backend/jsoo/jscoq_worker.bc.js))
(alias
(name wacoq_worker)
(deps
backend/wasm/wacoq_worker.bc))
(dirs (:standard _vendor+*))
(vendored_dirs vendor)