You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
794 B

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. const copyright = `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`;
  6. export default [
  7. {
  8. input: "index",
  9. plugins: [
  10. node(),
  11. ascii()
  12. ],
  13. output: {
  14. extend: true,
  15. banner: copyright,
  16. file: "dist/d3.js",
  17. format: "umd",
  18. indent: false,
  19. name: "d3"
  20. }
  21. },
  22. {
  23. input: "index",
  24. plugins: [
  25. node(),
  26. ascii(),
  27. terser({output: {preamble: copyright}})
  28. ],
  29. output: {
  30. extend: true,
  31. file: "dist/d3.min.js",
  32. format: "umd",
  33. indent: false,
  34. name: "d3"
  35. }
  36. }
  37. ];