rollup.config.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import buble from '@rollup/plugin-buble';
  2. export default [
  3. {
  4. input: "src/codemirror.js",
  5. output: {
  6. banner: `// CodeMirror, copyright (c) by Marijn Haverbeke and others
  7. // Distributed under an MIT license: https://codemirror.net/LICENSE
  8. // This is CodeMirror (https://codemirror.net), a code editor
  9. // implemented in JavaScript on top of the browser's DOM.
  10. //
  11. // You can find some technical background for some of the code below
  12. // at http://marijnhaverbeke.nl/blog/#cm-internals .
  13. `,
  14. format: "umd",
  15. file: "lib/codemirror.js",
  16. name: "CodeMirror"
  17. },
  18. plugins: [ buble({namedFunctionExpressions: false}) ]
  19. },
  20. {
  21. input: ["src/addon/runmode/runmode-standalone.js"],
  22. output: {
  23. format: "iife",
  24. file: "addon/runmode/runmode-standalone.js",
  25. name: "CodeMirror",
  26. freeze: false, // IE8 doesn't support Object.freeze.
  27. },
  28. plugins: [ buble({namedFunctionExpressions: false}) ]
  29. },
  30. {
  31. input: ["src/addon/runmode/runmode.node.js"],
  32. output: {
  33. format: "cjs",
  34. file: "addon/runmode/runmode.node.js",
  35. name: "CodeMirror",
  36. freeze: false, // IE8 doesn't support Object.freeze.
  37. },
  38. plugins: [ buble({namedFunctionExpressions: false}) ]
  39. },
  40. ];