Package list node-d3-shape / 91fd4e7
Use webpack to build umd module like upstream Pirate Praveen 3 years ago
6 changed file(s) with 17 addition(s) and 44 deletion(s). Raw diff Collapse all Expand all
77 , dh-buildinfo
88 , nodejs
99 , node-tape
10 , node-babel-cli
10 , webpack
11 , node-babel-loader
12 , node-babel-plugin-add-module-exports
1113 , node-babel-preset-es2015
12 # , node-babel-loader
13 # , node-babel-core
14 # , webpack
1514 , node-d3-path (>= 1)
1615 , node-d3-polygon
17 Standards-Version: 4.1.0
16 Standards-Version: 4.1.3
1817 Homepage: https://d3js.org/d3-shape/
1918 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-d3-shape.git
2019 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-d3-shape.git
00 package.json usr/lib/nodejs/d3-shape/
1 lib usr/lib/nodejs/d3-shape/
1 build usr/lib/nodejs/d3-shape/
+0
-1
debian/patches/series less more
0 use-babel.patch
+0
-21
debian/patches/use-babel.patch less more
0 --- /dev/null
1 +++ b/.babelrc
2 @@ -0,0 +1,7 @@
3 +{
4 + "presets": [
5 + ["es2015", {
6 + "loose": false,
7 + }],
8 + ],
9 +}
10 --- a/package.json
11 +++ b/package.json
12 @@ -16,7 +16,7 @@
13 "name": "Mike Bostock",
14 "url": "http://bost.ocks.org/mike"
15 },
16 - "main": "build/d3-shape.js",
17 + "main": "lib/index.js",
18 "module": "index",
19 "jsnext:main": "index",
20 "repository": {
77 dh $@
88
99 override_dh_auto_build:
10 babeljs src -d lib
11 babeljs index.js -d lib
12 sed -i 's/.\/src/./' lib/index.js
13 # TODO: investigate segfault
14 # 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'
10 webpack --config debian/webpack.config.js \
11 --output-library=d3 \
12 index.js build/d3-shape.js
1513
1614 override_dh_auto_test:
1715 tape 'test/**/*.js'
1816
1917 override_dh_auto_clean:
20 rm -rf lib build
18 rm -rf build
2119 dh_auto_clean
00 'use strict';
1
2 var fs = require('fs');
31 var path = require('path');
4 var webpack = require('webpack');
5
62 var config = {
7
3 target: 'web',
84 resolve: {
5 modules: ['/usr/lib/nodejs', '.'],
6 },
7 resolveLoader: {
98 modules: ['/usr/lib/nodejs'],
109 },
11
12 resolveLoader: {
13 modules: ['/usr/lib/nodejs'],
14 }
10 output: {
11 libraryTarget: 'umd'
12 },
13 module: { rules: [ {test: /\.js$/, loader: 'babel-loader', options: { presets: [ 'es2015' ], plugins: ['add-module-exports'] } }] }
1514 }
16
1715 module.exports = config;