diff -Nru node-d3-drag-1.2.1/debian/changelog node-d3-drag-1.2.1/debian/changelog --- node-d3-drag-1.2.1/debian/changelog 2017-10-12 11:41:26.000000000 +0000 +++ node-d3-drag-1.2.1/debian/changelog 2018-01-06 05:49:06.000000000 +0000 @@ -1,3 +1,9 @@ +node-d3-drag (1.2.1-2) unstable; urgency=medium + + * Use webpack to build umd module like upstream + + -- Pirate Praveen Sat, 06 Jan 2018 11:19:06 +0530 + node-d3-drag (1.2.1-1) unstable; urgency=medium * New upstream release diff -Nru node-d3-drag-1.2.1/debian/control node-d3-drag-1.2.1/debian/control --- node-d3-drag-1.2.1/debian/control 2017-10-03 06:48:06.000000000 +0000 +++ node-d3-drag-1.2.1/debian/control 2018-01-06 05:49:06.000000000 +0000 @@ -8,9 +8,13 @@ , dh-buildinfo , nodejs , node-tape - , node-babel-cli + , webpack + , node-babel-loader + , node-babel-plugin-add-module-exports , node-babel-preset-es2015 -Standards-Version: 4.1.0 + , node-d3-dispatch (>= 1) + , node-d3-selection (>= 1) +Standards-Version: 4.1.3 Homepage: https://d3js.org/d3-drag/ Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-d3-drag.git Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-d3-drag.git diff -Nru node-d3-drag-1.2.1/debian/install node-d3-drag-1.2.1/debian/install --- node-d3-drag-1.2.1/debian/install 2017-10-03 06:49:41.000000000 +0000 +++ node-d3-drag-1.2.1/debian/install 2018-01-06 05:49:06.000000000 +0000 @@ -1,3 +1,3 @@ package.json usr/lib/nodejs/d3-drag/ img usr/lib/nodejs/d3-drag/ -lib usr/lib/nodejs/d3-drag/ +build usr/lib/nodejs/d3-drag/ diff -Nru node-d3-drag-1.2.1/debian/patches/series node-d3-drag-1.2.1/debian/patches/series --- node-d3-drag-1.2.1/debian/patches/series 2017-10-03 06:48:49.000000000 +0000 +++ node-d3-drag-1.2.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -use-babel.patch diff -Nru node-d3-drag-1.2.1/debian/patches/use-babel.patch node-d3-drag-1.2.1/debian/patches/use-babel.patch --- node-d3-drag-1.2.1/debian/patches/use-babel.patch 2017-10-03 06:49:29.000000000 +0000 +++ node-d3-drag-1.2.1/debian/patches/use-babel.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ ---- /dev/null -+++ b/.babelrc -@@ -0,0 +1,22 @@ -+{ -+ "presets": [ -+ ["es2015", { -+ "loose": false, -+ }], -+ ], -+ "plugins": [ -+ ], -+ "env": { -+ "watch": { -+ "presets": [ -+ ["es2015", { -+ "loose": true -+ }], -+ "stage-0" -+ ] -+ }, -+ "test": { -+ "plugins": ["istanbul"] -+ } -+ } -+} ---- a/package.json -+++ b/package.json -@@ -15,7 +15,7 @@ - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, -- "main": "build/d3-drag.js", -+ "main": "lib/index.js", - "module": "index", - "jsnext:main": "index", - "repository": { diff -Nru node-d3-drag-1.2.1/debian/rules node-d3-drag-1.2.1/debian/rules --- node-d3-drag-1.2.1/debian/rules 2017-10-12 11:41:26.000000000 +0000 +++ node-d3-drag-1.2.1/debian/rules 2018-01-06 05:49:06.000000000 +0000 @@ -8,16 +8,14 @@ dh $@ override_dh_auto_build: - babeljs src -d lib - babeljs index.js -d lib - sed -i 's/.\/src/./' lib/index.js -# TODO: investigate segfault -# webpack --config debian/webpack.config.js index.js build/d3-drag.js --target=web --output-library=d3-drag --output-library-target=umd --module-bind 'js=babel-loader' + webpack --config debian/webpack.config.js \ + --output-library=d3 \ + index.js build/d3-drag.js override_dh_auto_test: tape 'test/**/*-test.js' override_dh_auto_clean: dh_auto_clean - rm -rf lib + rm -rf build diff -Nru node-d3-drag-1.2.1/debian/webpack.config.js node-d3-drag-1.2.1/debian/webpack.config.js --- node-d3-drag-1.2.1/debian/webpack.config.js 2017-10-12 11:41:26.000000000 +0000 +++ node-d3-drag-1.2.1/debian/webpack.config.js 2018-01-06 05:49:06.000000000 +0000 @@ -1,18 +1,16 @@ 'use strict'; - -var fs = require('fs'); var path = require('path'); -var webpack = require('webpack'); - var config = { - + target: 'web', resolve: { - modules: ['/usr/lib/nodejs'], + modules: ['/usr/lib/nodejs', '.'], }, - resolveLoader: { modules: ['/usr/lib/nodejs'], - } + }, + output: { + libraryTarget: 'umd' + }, + module: { rules: [ {test: /\.js$/, loader: 'babel-loader', options: { presets: [ 'es2015' ], plugins: ['add-module-exports'] } }] } } - module.exports = config;