Package: node-mocha / 4.1.0+ds3-5

0005-Use-webpack-instead-of-browserify.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 1e93a47540267d5344ead645bf88834dd54b7437 Mon Sep 17 00:00:00 2001
From: Leo Iannacone <l3on@ubuntu.com>
Date: Thu, 1 Nov 2018 16:16:09 +0100
Subject: Use webpack instead of browserify

Forwarded: no
---
 Makefile | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 7567fc16..5e008f3c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-BROWSERIFY := "node_modules/.bin/browserify"
+BROWSERIFY := "webpack"
 KARMA := "node_modules/.bin/karma"
 MOCHA := "bin/mocha"
 NYC := "node_modules/.bin/nyc"
@@ -20,13 +20,11 @@ all: mocha.js
 mocha.js: $(SRC) browser-entry.js
 	@printf "==> [Browser :: build]\n"
 	mkdir -p ${@D}
-	$(BROWSERIFY) ./browser-entry \
-		--require buffer/:buffer \
-		--plugin ./scripts/dedefine \
-		--ignore 'fs' \
-		--ignore 'glob' \
-		--ignore 'path' \
-		--ignore 'supports-color' > $@
+	$(BROWSERIFY) ./browser-entry $@ \
+	--config debian/webpack.config.js \
+	--target=web \
+	--output-library=mocha \
+	--output-library-target=umd
 
 clean:
 	@printf "==> [Clean]\n"