| 12
 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
 
 | #!/usr/bin/make -f
# generate documentation unless nodoc requested
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
DOCS = README.html README.txt
endif
NODE_PATH = debian/node_modules
ESLINT = NODE_PATH=$(NODE_PATH) eslint
MOCHA = NODE_PATH=$(NODE_PATH) mocha --no-timeout
MOCHA_TAP := $(MOCHA) --reporter tap
# 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_auto_clean:
	rm -rf debian/node_modules
override_dh_clean:
	dh_clean -- $(DOCS)
override_dh_auto_configure:
	mkdir -p debian/node_modules
	ln --force --symbolic ../.. debian/node_modules/eslint-plugin-node
override_dh_auto_build: $(DOCS)
	node scripts/update-lib-index
# TODO: fix remaining test failures (likely PATH-related)
override_dh_auto_test:
	$(ESLINT) lib tests/lib
	$(MOCHA) --exclude tests/lib/configs/recommended.js 'tests/lib/**/*.js'
	$(MOCHA_TAP) tests/lib/configs/recommended.js | debian/tap-todo \
		'^node/recommended config in CJS directory \*\.mjs files should be a module\.$$' \
		'^node/recommended config in ESM directory \*\.js files should be a module\.$$' \
		'^node/recommended config in ESM directory \*\.mjs files should be a module\.$$'
override_dh_installdocs:
	dh_installdocs --all -- $(DOCS)
%.html: %.md
	cmark-gfm $< > $@
%.txt: %.md
	cmark-gfm --to plaintext $< > $@
%:
	dh $@
 |