diff -Nru node-d3-shape-1.2.0/debian/changelog node-d3-shape-1.2.0/debian/changelog --- node-d3-shape-1.2.0/debian/changelog 2017-10-12 07:52:01.000000000 +0000 +++ node-d3-shape-1.2.0/debian/changelog 2018-01-06 16:58:52.000000000 +0000 @@ -1,3 +1,9 @@ +node-d3-shape (1.2.0-2) unstable; urgency=medium + + * Use webpack to build umd module like upstream + + -- Pirate Praveen Sat, 06 Jan 2018 22:28:52 +0530 + node-d3-shape (1.2.0-1) unstable; urgency=low * Initial release (Closes: #878287) diff -Nru node-d3-shape-1.2.0/debian/control node-d3-shape-1.2.0/debian/control --- node-d3-shape-1.2.0/debian/control 2017-10-12 07:52:01.000000000 +0000 +++ node-d3-shape-1.2.0/debian/control 2018-01-06 16:58:52.000000000 +0000 @@ -8,14 +8,13 @@ , dh-buildinfo , nodejs , node-tape - , node-babel-cli + , webpack + , node-babel-loader + , node-babel-plugin-add-module-exports , node-babel-preset-es2015 -# , node-babel-loader -# , node-babel-core -# , webpack , node-d3-path (>= 1) , node-d3-polygon -Standards-Version: 4.1.0 +Standards-Version: 4.1.3 Homepage: https://d3js.org/d3-shape/ Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-d3-shape.git Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-d3-shape.git diff -Nru node-d3-shape-1.2.0/debian/install node-d3-shape-1.2.0/debian/install --- node-d3-shape-1.2.0/debian/install 2017-10-12 07:37:13.000000000 +0000 +++ node-d3-shape-1.2.0/debian/install 2018-01-06 16:58:52.000000000 +0000 @@ -1,2 +1,2 @@ package.json usr/lib/nodejs/d3-shape/ -lib usr/lib/nodejs/d3-shape/ +build usr/lib/nodejs/d3-shape/ diff -Nru node-d3-shape-1.2.0/debian/patches/series node-d3-shape-1.2.0/debian/patches/series --- node-d3-shape-1.2.0/debian/patches/series 2017-10-12 07:25:56.000000000 +0000 +++ node-d3-shape-1.2.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -use-babel.patch diff -Nru node-d3-shape-1.2.0/debian/patches/use-babel.patch node-d3-shape-1.2.0/debian/patches/use-babel.patch --- node-d3-shape-1.2.0/debian/patches/use-babel.patch 2017-10-12 07:36:25.000000000 +0000 +++ node-d3-shape-1.2.0/debian/patches/use-babel.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ ---- /dev/null -+++ b/.babelrc -@@ -0,0 +1,7 @@ -+{ -+ "presets": [ -+ ["es2015", { -+ "loose": false, -+ }], -+ ], -+} ---- a/package.json -+++ b/package.json -@@ -16,7 +16,7 @@ - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, -- "main": "build/d3-shape.js", -+ "main": "lib/index.js", - "module": "index", - "jsnext:main": "index", - "repository": { diff -Nru node-d3-shape-1.2.0/debian/rules node-d3-shape-1.2.0/debian/rules --- node-d3-shape-1.2.0/debian/rules 2017-10-12 07:36:48.000000000 +0000 +++ node-d3-shape-1.2.0/debian/rules 2018-01-06 16:58:52.000000000 +0000 @@ -8,15 +8,13 @@ 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-shape.js --target=web --output-library=d3-shape --output-library-target=umd --module-bind 'js=babel-loader' + webpack --config debian/webpack.config.js \ + --output-library=d3 \ + index.js build/d3-shape.js override_dh_auto_test: tape 'test/**/*.js' override_dh_auto_clean: - rm -rf lib build + rm -rf build dh_auto_clean diff -Nru node-d3-shape-1.2.0/debian/webpack.config.js node-d3-shape-1.2.0/debian/webpack.config.js --- node-d3-shape-1.2.0/debian/webpack.config.js 2017-10-12 07:24:32.000000000 +0000 +++ node-d3-shape-1.2.0/debian/webpack.config.js 2018-01-06 16:58:52.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;