File: rules

package info (click to toggle)
node-espree 9.4.1~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,064 kB
  • sloc: javascript: 211,653; makefile: 32; sh: 1; xml: 1
file content (48 lines) | stat: -rwxr-xr-x 1,117 bytes parent folder | download
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
#!/usr/bin/make -f

# generate documentation unless nodoc requested
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
DOCS = README.html README.txt
CHANGELOGS = CHANGELOG.html CHANGELOG.txt
endif

ESLINT = eslint
MOCHA = mocha --no-timeout
# normalize output with TAP where possible unless terse requested
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
ESLINT += --format tap
MOCHA += --reporter tap
else
ESLINT += --format unix
MOCHA += --reporter dot --no-colors
endif

override_dh_clean:
	dh_clean -- $(DOCS) $(CHANGELOGS)

override_dh_auto_build:
	rollup -c

execute_after_dh_auto_build: $(DOCS) $(CHANGELOGS)

# TODO: check full testsuite
# TODO: lint-check code strictly
override_dh_auto_test:
	$(MOCHA) --ignore tests/lib/libraries.js 'tests/lib/**/*.js'
	$(MOCHA) tests/lib/commonjs.cjs
	$(ESLINT) --no-eslintrc --env es2020 --parser-options sourceType:module '*.?(c)js' lib/ tests/lib/ || true

override_dh_installdocs:
	dh_installdocs --all -- $(DOCS)

override_dh_installchangelogs:
	dh_installchangelogs -- $(CHANGELOGS)

%.html: %.md
	cmark-gfm $< > $@

%.txt: %.md
	cmark-gfm --to plaintext $< > $@

%:
	dh $@