[Pkg-javascript-commits] [node-rollup-pluginutils] 04/05: Use babeljs to 'compile' the code

Julien Puydt julien.puydt at laposte.net
Fri Nov 24 13:51:25 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 79274751144f0076385f361a9cf1eea11912af43
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Thu Nov 23 08:12:53 2017 +0100

    Use babeljs to 'compile' the code
---
 debian/changelog |  1 +
 debian/control   |  2 +-
 debian/rules     | 18 ++----------------
 3 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index da4271d..1f1a15a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ node-rollup-pluginutils (2.0.1-4) UNRELEASED; urgency=medium
 
   * Bump std-ver to 4.1.1.
   * Run the upstream test suite in autopkgtest.
+  * Use babeljs to "compile" the code.
 
  -- Julien Puydt <julien.puydt at laposte.net>  Thu, 23 Nov 2017 08:04:26 +0100
 
diff --git a/debian/control b/debian/control
index cdbb9a7..d4f1201 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: web
 Priority: optional
 Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
 Uploaders: Julien Puydt <julien.puydt at laposte.net>
-Build-Depends: debhelper (>= 10), nodejs (>= 6), node-es6-module-transpiler (>= 0.10.0-2), node-estree-walker, node-micromatch
+Build-Depends: debhelper (>= 10), nodejs (>= 6), node-babel-cli, node-babel-preset-es2015
 Standards-Version: 4.1.1
 Homepage: https://github.com/rollup/rollup-pluginutils
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-rollup-pluginutils.git
diff --git a/debian/rules b/debian/rules
index 916d34f..2035939 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,24 +1,10 @@
 #!/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: 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_build:
+	babeljs --presets=es2015 src -d dist
 
 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