summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPirate Praveen <praveen@debian.org>2018-02-28 21:42:04 +0530
committerPirate Praveen <praveen@debian.org>2018-02-28 21:42:04 +0530
commite4f5c6e18de0cd8122ef0915b8665872d9a1e882 (patch)
tree41fbfae6fd92723de527b98d13891603cddccace
parentc94ba47c26752301f1efec9cc4b5a7d368660128 (diff)
Build using rollup (webpack was used before rollup was available in main)
-rw-r--r--debian/control7
-rwxr-xr-xdebian/rules5
-rw-r--r--debian/webpack.config.js16
3 files changed, 5 insertions, 23 deletions
diff --git a/debian/control b/debian/control
index 50bc118..648a4a9 100644
--- a/debian/control
+++ b/debian/control
@@ -8,10 +8,9 @@ Build-Depends:
, dh-buildinfo
, nodejs
, node-tape
- , webpack
- , node-babel-loader
- , node-babel-plugin-add-module-exports
- , node-babel-preset-es2015
+ , node-package-preamble
+ , rollup
+ , uglifyjs
, node-d3-array
Standards-Version: 4.1.3
Homepage: https://d3js.org/d3-collection/
diff --git a/debian/rules b/debian/rules
index bfa1a49..1429714 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,9 +8,8 @@
dh $@
override_dh_auto_build:
- webpack --config debian/webpack.config.js \
- --output-library=d3 \
- index.js build/d3-collection.js
+ rollup --banner "$$(preamble)" -f umd -n d3 -o build/d3-collection.js index.js
+ uglifyjs -b beautify=false,preamble="'$$(preamble)'" build/d3-collection.js -c -m -o build/d3-collection.min.js
override_dh_auto_test:
tape 'test/**/*-test.js'
diff --git a/debian/webpack.config.js b/debian/webpack.config.js
deleted file mode 100644
index f9cb59f..0000000
--- a/debian/webpack.config.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'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: [ {test: /\.js$/, loader: 'babel-loader', options: { presets: [ 'es2015' ], plugins: ['add-module-exports'] } }] }
-}
-module.exports = config;