#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 ROLLUP_PLUGINS=-p @rollup/plugin-babel -p rollup-plugin-typescript2 -p rollup-plugin-terser ES_FILE=$(shell pkgjs-pjson . exports . import) CJS_FILE=$(shell pkgjs-pjson . exports . require) %: dh $@ override_dh_auto_build: rollup $(ROLLUP_PLUGINS) --external react -f es -o $(ES_FILE) index.tsx ln -s $(ES_FILE) index.js rollup $(ROLLUP_PLUGINS) --external react -p @rollup/plugin-node-resolve -f cjs -o $(CJS_FILE) index.cjs.tsx rm -f index.js override_dh_installdocs: dh_installdocs dh_nodejs_autodocs