Codebase list node-rollup-plugin-commonjs / debian/8.2.4-2 debian / rules
debian/8.2.4-2

Tree @debian/8.2.4-2 (Download .tar.gz)

rules @debian/8.2.4-2raw · history · blame

#!/usr/bin/make -f

SOURCES = $(shell find src/ -name "*.js")
TARGETS = $(subst src, dist, $(SOURCES))

# in fact graceful-fs isn't really necessary, but until we have rollup...
COMPILE_MODULES = compile-modules convert -f commonjs -I/usr/lib/nodejs/graceful-fs

.PHONY: dist

%.js:
	$(COMPILE_MODULES) $(subst dist, src, $@) > $@

%:
	dh $@

override_dh_auto_build: dist $(TARGETS)
	sed -i dist/index.js -e "s/exports.*/module.exports = commonjs;/g"
	sed -i dist/transform.js -e 's/\["default"\]//g'

override_dh_auto_clean:
	rm -rf dist

dist:
	mkdir dist