[Pkg-javascript-commits] [node-mocha] 05/08: use webpack in place of browserify

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Dec 11 18:52:33 UTC 2017


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

praveen pushed a commit to branch master
in repository node-mocha.

commit 8e177e4bd9e0aa573ffaa7a3dee88ef18acb4b85
Author: Pirate Praveen <praveen at debian.org>
Date:   Mon Dec 11 23:55:12 2017 +0530

    use webpack in place of browserify
---
 debian/patches/0001-use-webpack.patch | 27 +++++++++++++++++++++++++++
 debian/patches/series                 |  1 +
 debian/webpack.config.js              | 18 ++++++++++++++++++
 3 files changed, 46 insertions(+)

diff --git a/debian/patches/0001-use-webpack.patch b/debian/patches/0001-use-webpack.patch
new file mode 100644
index 0000000..80f900a
--- /dev/null
+++ b/debian/patches/0001-use-webpack.patch
@@ -0,0 +1,27 @@
+--- 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 @@
+ 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"
diff --git a/debian/patches/series b/debian/patches/series
index 741cd1f..1fa49ea 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+0001-use-webpack.patch
 0003_image_and_css_in_usr_share.patch
diff --git a/debian/webpack.config.js b/debian/webpack.config.js
new file mode 100644
index 0000000..1f62b0e
--- /dev/null
+++ b/debian/webpack.config.js
@@ -0,0 +1,18 @@
+'use strict';
+
+var fs = require('fs');
+var path = require('path');
+var webpack = require('webpack');
+
+var config = {
+
+  resolve: {
+    modules: ['/usr/lib/nodejs'],
+  },
+
+  resolveLoader: {
+    modules: ['/usr/lib/nodejs'],
+  }
+}
+
+module.exports = config;

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



More information about the Pkg-javascript-commits mailing list