[Pkg-javascript-commits] [node-url-parse] 08/11: build using webpack

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Tue Jan 2 17:20:53 UTC 2018


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

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

commit 7231e3e5d9c6ee625b1dc5605184aa162b19c52b
Author: Pirate Praveen <praveen at debian.org>
Date:   Tue Jan 2 22:33:44 2018 +0530

    build using webpack
---
 debian/control           |  1 +
 debian/install           |  4 +---
 debian/rules             |  4 +++-
 debian/webpack.config.js | 16 ++++++++++++++++
 4 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/debian/control b/debian/control
index cb70383..713854d 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends:
  debhelper (>= 9)
  , dh-buildinfo
  , nodejs
+ , webpack
 Standards-Version: 4.1.3
 Homepage: https://github.com/unshiftio/url-parse#readme
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-url-parse.git
diff --git a/debian/install b/debian/install
index 2be0356..147913e 100644
--- a/debian/install
+++ b/debian/install
@@ -1,5 +1,3 @@
 package.json usr/lib/nodejs/url-parse/
 index.js usr/lib/nodejs/url-parse/
-fuzzy.js usr/lib/nodejs/url-parse/
-lolcation.js usr/lib/nodejs/url-parse/
-test.js usr/lib/nodejs/url-parse/
+dist usr/lib/nodejs/url-parse/
diff --git a/debian/rules b/debian/rules
index de57af0..0c046cf 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,9 @@
 %:
 	dh $@
 
-#override_dh_auto_build:
+override_dh_auto_build:
+	webpack --config debian/webpack.config.js index.js dist/url-parse.js
+	uglifyjs dist/url-parse.js > dist/url-parse.min.js
 
 #override_dh_auto_test:
 
diff --git a/debian/webpack.config.js b/debian/webpack.config.js
new file mode 100644
index 0000000..fe43ff3
--- /dev/null
+++ b/debian/webpack.config.js
@@ -0,0 +1,16 @@
+'use strict';
+var path = require('path');
+var config = {
+  target: 'web',
+  resolve: {
+    modules: ['/usr/lib/nodejs', '.'],
+  },
+  resolveLoader: {
+    modules: ['/usr/lib/nodejs'],
+  },
+  output: {
+    libraryTarget: 'umd'
+  },
+  module: { rules: [ { use: [ 'babel-loader' ] } ] }
+}
+module.exports = config;

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



More information about the Pkg-javascript-commits mailing list