Package list node-d3-shape / e5260c1
Switch to rollup from webpack (rollup is in main now) Pirate Praveen 2 years ago
8 changed file(s) with 56 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
0 dist/*
66 debhelper (>= 11~)
77 , nodejs
88 , node-tape
9 , webpack
10 , node-babel-loader
11 , node-babel-plugin-add-module-exports
12 , node-babel-preset-es2015
9 , rollup
10 , uglifyjs.terser
1311 , node-d3-path (>= 1)
1412 , node-d3-polygon
1513 Standards-Version: 4.3.0
00 package.json usr/lib/nodejs/d3-shape/
1 build usr/lib/nodejs/d3-shape/
1 dist usr/lib/nodejs/d3-shape/
2 src usr/lib/nodejs/d3-shape/
0 This syntax is not supported in packaged rollup/node yet.
1 Minified file is generated by uglifyjs.terser command line.
2
3 --- a/rollup.config.js
4 +++ b/rollup.config.js
5 @@ -1,4 +1,3 @@
6 -import {terser} from "rollup-plugin-terser";
7 import * as meta from "./package.json";
8
9 const config = {
10 @@ -17,20 +16,5 @@
11 };
12
13 export default [
14 - config,
15 - {
16 - ...config,
17 - output: {
18 - ...config.output,
19 - file: `dist/${meta.name}.min.js`
20 - },
21 - plugins: [
22 - ...config.plugins,
23 - terser({
24 - output: {
25 - preamble: config.output.banner
26 - }
27 - })
28 - ]
29 - }
30 + config
31 ];
0 Description: Make the build reproducible
1 Author: Chris Lamb <lamby@debian.org>
2 Last-Update: 2019-06-20
3
4 --- a/rollup.config.js
5 +++ b/rollup.config.js
6 @@ -9,7 +9,7 @@
7 format: "umd",
8 indent: false,
9 extend: true,
10 - banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`,
11 + banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime())).getFullYear()} ${meta.author.name}`,
12 globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"})))
13 },
14 plugins: []
0 remove-unsupported-syntax.patch
1 reproducible_build.diff
77 dh $@
88
99 override_dh_auto_build:
10 webpack --config debian/webpack.config.js \
11 --output-library=d3 \
12 index.js build/d3-shape.js
10 rollup -c
11 uglifyjs.terser dist/d3-shape.js -o dist/d3-shape.min.js
1312
1413 override_dh_auto_test:
1514 tape 'test/**/*.js'
16
17 override_dh_auto_clean:
18 rm -rf build
19 dh_auto_clean
+0
-16
debian/webpack.config.js less more
0 'use strict';
1 var path = require('path');
2 var config = {
3 target: 'web',
4 resolve: {
5 modules: ['/usr/lib/nodejs', '.'],
6 },
7 resolveLoader: {
8 modules: ['/usr/lib/nodejs'],
9 },
10 output: {
11 libraryTarget: 'umd'
12 },
13 module: { rules: [ {test: /\.js$/, loader: 'babel-loader', options: { presets: [ 'es2015' ], plugins: ['add-module-exports'] } }] }
14 }
15 module.exports = config;