[Pkg-javascript-commits] [node-rollup-pluginutils] 02/06: Better d/rules
Julien Puydt
julien.puydt at laposte.net
Fri Aug 18 13:59:28 UTC 2017
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository node-rollup-pluginutils.
commit 0d38804cfc4fa4219de85c767d04d0d21a774c67
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Fri Aug 18 15:42:55 2017 +0200
Better d/rules
---
debian/changelog | 1 +
debian/rules | 21 +++++++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 4cd24ff..47e8200 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
node-rollup-pluginutils (2.0.1-2) UNRELEASED; urgency=medium
* Add a patch to avoid default argument values.
+ * Rewrote d/rules.
-- Julien Puydt <julien.puydt at laposte.net> Sun, 13 Aug 2017 13:29:48 +0200
diff --git a/debian/rules b/debian/rules
index 3a24829..916d34f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,19 +1,24 @@
#!/usr/bin/make -f
+SOURCES = $(shell find src/ -name "*.js")
+TARGETS = $(subst src, dist, $(SOURCES))
+
COMPILE_MODULES = compile-modules convert -f commonjs
+.PHONY: dist
+
+%.js:
+ $(COMPILE_MODULES) $(subst dist, src, $@) > $@
+
%:
dh $@
-override_dh_auto_build:
- mkdir -p dist/utils
- $(COMPILE_MODULES) src/addExtension.js > dist/addExtension.js
- $(COMPILE_MODULES) src/attachScopes.js > dist/attachScopes.js
- $(COMPILE_MODULES) src/createFilter.js > dist/createFilter.js
- $(COMPILE_MODULES) src/index.js > dist/index.js
- $(COMPILE_MODULES) src/makeLegalIdentifier.js > dist/makeLegalIdentifier.js
- $(COMPILE_MODULES) src/utils/ensureArray.js > dist/utils/ensureArray.js
+override_dh_auto_build: dist $(TARGETS)
sed -i dist/index.js -e "s/exports.\([[:alnum:]_-]*\) = \$$\$$\1\$$\$$\.\1/exports\.\1 = \$$\$$\1\$$\$$\.default/g"
+ sed -i dist/createFilter.js -e "s/\[\"default\"\]\././g"
override_dh_auto_clean:
rm -rf dist
+
+dist:
+ mkdir -p dist/utils
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-rollup-pluginutils.git
More information about the Pkg-javascript-commits
mailing list