#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with nodejs

override_dh_auto_build:
	ln -s /usr/share/nodejs/buffer .
	webpack --config debian/webpack.config.js --output-library=jschardet \
	--entry index.js --output dist/jschardet.js
	uglifyjs.terser dist/jschardet.js -o dist/jschardet.min.js

override_dh_auto_clean:
	rm -rf buffer node_modules/.cache
