[Pkg-javascript-commits] [node-magic-string] 04/05: Use rollup -- as does upstream!

Julien Puydt julien.puydt at laposte.net
Sat Feb 24 23:28:54 UTC 2018


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository node-magic-string.

commit b7f020cacb5096697cbc740da14c35a5b7b4611e
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Sat Feb 24 23:11:49 2018 +0100

    Use rollup -- as does upstream!
---
 debian/changelog                   |  6 ++++++
 debian/control                     |  8 ++++++--
 debian/copyright                   |  1 -
 debian/install                     |  2 +-
 debian/links                       |  3 +--
 debian/patches/external_skip.patch | 15 +++++++++++++++
 debian/patches/series              |  1 +
 debian/rules                       | 21 ++++-----------------
 8 files changed, 34 insertions(+), 23 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4430c53..593f2a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+node-magic-string (0.22.4-5) UNRELEASED; urgency=medium
+
+  * Compile using rollup (Closes: #848858).
+
+ -- Julien Puydt <julien.puydt at laposte.net>  Sat, 24 Feb 2018 23:45:07 +0100
+
 node-magic-string (0.22.4-4) unstable; urgency=medium
 
   * Add patch to check undefined chunks.
diff --git a/debian/control b/debian/control
index 1a2228b..5a3816c 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,11 @@ Section: javascript
 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 (>= 11), nodejs, node-es6-module-transpiler, node-vlq
+Build-Depends: debhelper (>= 11),
+               node-rollup-plugin-node-resolve,
+               node-vlq,
+               nodejs,
+               rollup
 Standards-Version: 4.1.3
 Homepage: https://github.com/rich-harris/magic-string
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-magic-string.git
@@ -11,7 +15,7 @@ Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-magic-string.gi
 
 Package: node-magic-string
 Architecture: all
-Depends: ${misc:Depends}, nodejs, node-vlq
+Depends: node-vlq, nodejs, ${misc:Depends}
 Description: Modify strings, generate sourcemaps
  This package makes it possible to update a source map of a lightly modified
  source code.
diff --git a/debian/copyright b/debian/copyright
index 12ac3c7..469af6f 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -31,4 +31,3 @@ License: Expat
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
-
diff --git a/debian/install b/debian/install
index 1375ac9..e67eba3 100644
--- a/debian/install
+++ b/debian/install
@@ -1,2 +1,2 @@
-package.json usr/lib/nodejs/magic-string/
 dist/* usr/lib/nodejs/magic-string/
+package.json usr/lib/nodejs/magic-string/
diff --git a/debian/links b/debian/links
index 382d800..b5b984e 100644
--- a/debian/links
+++ b/debian/links
@@ -1,2 +1 @@
-# otherwise node-es6-module-transpiler isn't smart enough to find it
-usr/lib/nodejs/magic-string/index.js usr/lib/nodejs/magic-string/magic-string.js
+usr/lib/nodejs/magic-string/magic-string.cjs.js usr/lib/nodejs/magic-string/index.js
diff --git a/debian/patches/external_skip.patch b/debian/patches/external_skip.patch
new file mode 100644
index 0000000..d4c3819
--- /dev/null
+++ b/debian/patches/external_skip.patch
@@ -0,0 +1,15 @@
+Description: options.skip is no longer supported
+Author: Julien Puydt
+Forwarded: no
+
+--- a/rollup.config.js
++++ b/rollup.config.js
+@@ -12,7 +12,7 @@
+ 	exports: process.env.ES ? 'named' : 'default',
+ 	plugins: [
+ 		buble({ exclude: 'node_modules/**' }),
+-		nodeResolve({ jsnext: true, skip: external }),
++		nodeResolve({ jsnext: true }),
+ 		replace({ DEBUG: false })
+ 	],
+ 	moduleName: 'MagicString',
diff --git a/debian/patches/series b/debian/patches/series
index 1aac6c6..811b2c8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 optional_argument.patch
 fix_undefined_chunk.patch
+external_skip.patch
diff --git a/debian/rules b/debian/rules
index 868ed2a..ff467cc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,23 +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)
-	mv dist/index-legacy.js dist/index.js
-	sed -i dist/MagicString.js -e "s/DEBUG/false/g"
-	sed -i dist/index.js -e "s/exports\[\"default\"\]/module.exports/g"
+override_dh_auto_build:
+	rollup -c && rollup -c --environment ES && rollup -c --environment DEPS
 
-dist:
-	mkdir -p dist/utils
+override_dh_auto_clean:
+	rm -rf dist/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-magic-string.git



More information about the Pkg-javascript-commits mailing list