forked from data-gymnasia/courses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared.ts
52 lines (45 loc) · 1.34 KB
/
shared.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// =============================================================================
// Shared Data Gymnasia Scripts
// =============================================================================
import {loadScript} from '@mathigon/boost';
import './components/quill';
declare global {
interface Window {
CodeMirror: any;
Juniper: any;
}
}
loadScript('/resources/shared/static/prism.js');
loadScript('/resources/shared/static/juniper.min.js').then(() => {
if (window.CodeMirror) window.CodeMirror.defaults.indentUnit = 4;
new window.Juniper({
selector: '[python-executable]',
repo: 'data-gymnasia/python-binder',
isolateCells: false,
msgLoading: 'Loading or None returned'
});
new window.Juniper({
selector: '[bash-executable]',
repo: 'data-gymnasia/bash-binder',
isolateCells: false,
msgLoading: 'Loading or nothing returned',
kernelType: 'bash',
language: 'shell'
});
new window.Juniper({
selector: '[julia-executable]',
repo: 'data-gymnasia/julia-binder',
isolateCells: false,
msgLoading: 'Loading or nothing returned',
kernelType: 'julia-1.2',
language: 'julia'
});
new window.Juniper({
selector: '[r-executable]',
repo: 'data-gymnasia/r-binder',
isolateCells: false,
msgLoading: 'Loading or NULL returned',
kernelType: 'ir',
language: 'r'
});
});