#!/usr/bin/make -f

%:
	dh ${@} --builddirectory=build --buildsystem=cmake

execute_after_dh_auto_clean:
	rm -f html/src/style/index.css
	rm -f html/src/components/modal/modal.css
	rm -f src/html.h

execute_before_dh_auto_build:
	# build static css
	node-sass html/src/style/index.scss html/src/style/index.css
	node-sass html/src/components/modal/modal.scss html/src/components/modal/modal.css

	# build static html
	cd html && NODE_ENV=production NODE_PATH=/usr/share/nodejs webpack --mode production

	# build inline html
	node html/build.js
