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_configure:
23 mkdir -p node_modules/@types
24 cp --force --recursive --target node_modules/@types $(addprefix /usr/share/nodejs/@types/,eslint estree json-schema node)
25 ln -s /usr/share/nodejs/undici-types node_modules/
26
27 # TODO: refresh unicode ids and properties when ts-node works
28 override_dh_auto_build: $(DOCS)
29 # ts-node scripts/update-unicode-ids.ts
30 # ts-node scripts/update-unicode-properties.ts
31 tsc --module es2015
32 rollup --config
33
34 # TODO: lint-check code when ESLint plugins are in Debian
35 override_dh_auto_test:
36 cp --force --recursive --target node_modules/@types /usr/share/nodejs/@types/mocha
37 ts-node scripts/update-fixtures.ts
38 $(MOCHA) --require ts-node/register "test/*.ts"
39 # $(ESLINT) scripts src test --ext .ts
40
41 override_dh_installdocs:
42 dh_installdocs --all -- $(DOCS)
43
44 %.html: %.md
45 cmark-gfm $< > $@
46
47 %.txt: %.md
48 cmark-gfm --to plaintext $< > $@
49
50 %:
51 dh $@