#!/usr/bin/make -f %: dh $@ override_dh_auto_clean: rm -f jstz.js jstz.concat.js jstz.min.js dh_auto_clean override_dh_auto_build: # Pulled from gulpfile.js. Gulp will be used to build once it is packaged cat jstz.*.js > jstz.concat.js echo "\nif (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\n" \ " module.exports = jstz;\n" \ "} else if ((typeof define !== 'undefined' && define !== null) && (define.amd != null)) {\n" \ " define([], function() {\n" \ " return jstz;\n" \ " });\n" \ "} else {\n" \ " if (typeof root === 'undefined') {\n" \ " window.jstz = jstz;\n" \ " } else {\n" \ " root.jstz = jstz;\n" \ " }\n" \ "}\n}());\n" >> jstz.concat.js echo "(function (root) {" | cat - jstz.concat.js > jstz.js uglifyjs jstz.js -o jstz.min.js dh_auto_build