diff options
author | 2021-10-02 02:11:31 +0200 | |
---|---|---|
committer | 2021-10-02 02:11:31 +0200 | |
commit | b834db0fd424e7ab02fcd5e509d855f2d97863bd (patch) | |
tree | b56ce9b8f752d8ca98e1d9082c63542e5dd993c1 /language-web/src/main/js/editor/editor.ts | |
parent | feat: skeleton for language to store mapping (diff) | |
download | refinery-b834db0fd424e7ab02fcd5e509d855f2d97863bd.tar.gz refinery-b834db0fd424e7ab02fcd5e509d855f2d97863bd.tar.zst refinery-b834db0fd424e7ab02fcd5e509d855f2d97863bd.zip |
perf(web): split off CodeMirror chunks
Also optimizes statis asset caching.
Diffstat (limited to 'language-web/src/main/js/editor/editor.ts')
-rw-r--r-- | language-web/src/main/js/editor/editor.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/language-web/src/main/js/editor/editor.ts b/language-web/src/main/js/editor/editor.ts new file mode 100644 index 00000000..fbf8796b --- /dev/null +++ b/language-web/src/main/js/editor/editor.ts | |||
@@ -0,0 +1,18 @@ | |||
1 | import 'codemirror/addon/selection/active-line'; | ||
2 | import 'mode-problem'; | ||
3 | import { Controlled } from 'react-codemirror2'; | ||
4 | import { createServices, removeServices } from 'xtext/xtext-codemirror'; | ||
5 | |||
6 | export interface IEditorChunk { | ||
7 | CodeMirror: typeof Controlled; | ||
8 | |||
9 | createServices: typeof createServices; | ||
10 | |||
11 | removeServices: typeof removeServices; | ||
12 | } | ||
13 | |||
14 | export const editorChunk: IEditorChunk = { | ||
15 | CodeMirror: Controlled, | ||
16 | createServices, | ||
17 | removeServices, | ||
18 | }; | ||