1 | import ascii from "rollup-plugin-ascii";
|
2 | import node from "rollup-plugin-node-resolve";
|
3 | import {terser} from "rollup-plugin-terser";
|
4 | import * as meta from "./package.json";
|
5 |
|
6 | const copyright = `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`;
|
7 |
|
8 | export default [
|
9 | {
|
10 | input: "index",
|
11 | plugins: [
|
12 | node(),
|
13 | ascii()
|
14 | ],
|
15 | output: {
|
16 | extend: true,
|
17 | banner: copyright,
|
18 | file: "dist/d3.js",
|
19 | format: "umd",
|
20 | indent: false,
|
21 | name: "d3"
|
22 | }
|
23 | },
|
24 | {
|
25 | input: "index",
|
26 | plugins: [
|
27 | node(),
|
28 | ascii(),
|
29 | terser({output: {preamble: copyright}})
|
30 | ],
|
31 | output: {
|
32 | extend: true,
|
33 | file: "dist/d3.min.js",
|
34 | format: "umd",
|
35 | indent: false,
|
36 | name: "d3"
|
37 | }
|
38 | }
|
39 | ];
|