comparison .cms/lib/codemirror/rollup.config.js @ 0:78edf6b517a0 draft

24.10
author Coffee CMS <info@coffee-cms.ru>
date Fri, 11 Oct 2024 22:40:23 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:78edf6b517a0
1 import buble from '@rollup/plugin-buble';
2 import copy from 'rollup-plugin-copy'
3
4 let copyVim = copy({
5 targets: [
6 {
7 src: require.resolve("cm5-vim/vim.js").replace(/\\/g, "/"),
8 dest: "./keymap"
9 }
10 ]
11 });
12
13 export default [
14 {
15 input: "src/codemirror.js",
16 output: {
17 banner: `// CodeMirror, copyright (c) by Marijn Haverbeke and others
18 // Distributed under an MIT license: https://codemirror.net/5/LICENSE
19
20 // This is CodeMirror (https://codemirror.net/5), a code editor
21 // implemented in JavaScript on top of the browser's DOM.
22 //
23 // You can find some technical background for some of the code below
24 // at http://marijnhaverbeke.nl/blog/#cm-internals .
25 `,
26 format: "umd",
27 file: "lib/codemirror.js",
28 name: "CodeMirror"
29 },
30 plugins: [ buble({namedFunctionExpressions: false}), copyVim ]
31 },
32 {
33 input: ["src/addon/runmode/runmode-standalone.js"],
34 output: {
35 format: "iife",
36 file: "addon/runmode/runmode-standalone.js",
37 name: "CodeMirror",
38 freeze: false, // IE8 doesn't support Object.freeze.
39 },
40 plugins: [ buble({namedFunctionExpressions: false}) ]
41 },
42 {
43 input: ["src/addon/runmode/runmode.node.js"],
44 output: {
45 format: "cjs",
46 file: "addon/runmode/runmode.node.js",
47 name: "CodeMirror",
48 freeze: false, // IE8 doesn't support Object.freeze.
49 },
50 plugins: [ buble({namedFunctionExpressions: false}) ]
51 },
52 ];