Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 # generate documentation unless nodoc requested
4 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
5 DOCS = README.html README.txt
6 endif
7
8 ESLINT = eslint
9 MOCHA = mocha --no-timeout
10 # normalize output with TAP where possible unless terse requested
11 ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
12 ESLINT += --format tap
13 MOCHA += --reporter tap
14 else
15 ESLINT += --format unix
16 MOCHA += --reporter dot --no-colors
17 endif
18
19 override_dh_clean:
20 dh_clean -- $(DOCS)
21
22 override_dh_auto_build: $(DOCS)
23 rollup --no-esModule --config
24
25 # TODO: lint-check src/get-static-value.js
26 # TODO: lint-check docs/.vuepress/config.js
27 # TODO: check with mocha when node module esm is in Debian
28 # and then also apply patch in bug#1006359
29 override_dh_auto_test:
30 $(ESLINT) --ignore-pattern src/get-static-value.js src test
31 # $(ESLINT) docs/.vuepress/config.js src test rollup.config.js
32 # $(MOCHA)
33
34 override_dh_installdocs:
35 dh_installdocs --all -- $(DOCS)
36
37 override_dh_clean:
38 dh_clean -- $(DOCS)
39
40 %.html: %.md
41 cmark-gfm $< > $@
42
43 %.txt: %.md
44 cmark-gfm --to plaintext $< > $@
45
46 %:
47 dh $@