diff options
author | Pirate Praveen <praveen@debian.org> | 2018-01-06 21:31:13 +0530 |
---|---|---|
committer | Pirate Praveen <praveen@debian.org> | 2018-01-06 21:31:13 +0530 |
commit | 9f9feaf6c74be58c638c444514299f271dfa6b6b (patch) | |
tree | df3b2b7230004e263b3944b22ac24cb0aed7f268 | |
parent | 0a59257556b949490bd8f159d7ab4a6ea2e2ad7e (diff) |
Use umd module as main
-rw-r--r-- | debian/control | 7 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/use-babel.patch | 10 | ||||
-rwxr-xr-x | debian/rules | 9 | ||||
-rw-r--r-- | debian/webpack.config.js | 16 |
5 files changed, 14 insertions, 29 deletions
diff --git a/debian/control b/debian/control index 738d4fb..ebba064 100644 --- a/debian/control +++ b/debian/control @@ -7,13 +7,12 @@ Build-Depends: debhelper (>= 9) , dh-buildinfo , nodejs - , node-babel-cli - , node-babel-preset-es2015 , webpack , node-babel-loader - , node-babel-core + , node-babel-plugin-add-module-exports + , node-babel-preset-es2015 , node-tape -Standards-Version: 4.1.0 +Standards-Version: 4.1.3 Homepage: https://d3js.org/d3-polygon/ Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-d3-polygon.git Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-d3-polygon.git diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 7937310..0000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -use-babel.patch diff --git a/debian/patches/use-babel.patch b/debian/patches/use-babel.patch deleted file mode 100644 index 2cb01ba..0000000 --- a/debian/patches/use-babel.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- /dev/null -+++ b/.babelrc -@@ -0,0 +1,7 @@ -+{ -+ "presets": [ -+ ["es2015", { -+ "loose": false, -+ }], -+ ], -+} diff --git a/debian/rules b/debian/rules index e200e68..8ca7cac 100755 --- a/debian/rules +++ b/debian/rules @@ -8,14 +8,13 @@ dh $@ override_dh_auto_build: - babeljs src -d lib - babeljs index.js -d lib - sed -i 's/.\/src/./' lib/index.js - webpack --config debian/webpack.config.js index.js build/d3-polygon.js --target=web --output-library=d3-polygon --output-library-target=umd --module-bind 'js=babel-loader' + webpack --config debian/webpack.config.js \ + --output-library=d3 \ + index.js build/d3-polygon.js override_dh_auto_test: tape 'test/**/*.js' override_dh_auto_clean: - rm -rf lib build + rm -rf build dh_auto_clean diff --git a/debian/webpack.config.js b/debian/webpack.config.js index 1f62b0e..f9cb59f 100644 --- a/debian/webpack.config.js +++ b/debian/webpack.config.js @@ -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; |