aboutsummaryrefslogtreecommitdiffstats
path: root/language-web/src/main/webapp/script.js
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-06-27 14:22:40 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-06-27 14:22:40 +0200
commit07719e927f9d398765e661c84fd8778cefb39083 (patch)
tree9652080f7e580f09a0763a3e258348dea6e02684 /language-web/src/main/webapp/script.js
parentAdd enum support (diff)
downloadrefinery-07719e927f9d398765e661c84fd8778cefb39083.tar.gz
refinery-07719e927f9d398765e661c84fd8778cefb39083.tar.zst
refinery-07719e927f9d398765e661c84fd8778cefb39083.zip
Simplify project layout
Diffstat (limited to 'language-web/src/main/webapp/script.js')
-rw-r--r--language-web/src/main/webapp/script.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/language-web/src/main/webapp/script.js b/language-web/src/main/webapp/script.js
new file mode 100644
index 00000000..dced7eca
--- /dev/null
+++ b/language-web/src/main/webapp/script.js
@@ -0,0 +1,20 @@
1var baseUrl = window.location.pathname;
2var fileIndex = baseUrl.indexOf("index.html");
3if (fileIndex > 0)
4 baseUrl = baseUrl.slice(0, fileIndex)
5require.config({
6 baseUrl: baseUrl,
7 paths: {
8 "text": "webjars/requirejs-text/2.26.0.M1/text",
9 "jquery": "webjars/jquery/3.6.0/jquery.min",
10 "xtext/xtext-codemirror": "xtext/2.26.0.M1/xtext-codemirror",
11 },
12 packages: [{
13 name: "codemirror",
14 location: "webjars/codemirror/5.52.2",
15 main: "lib/codemirror"
16 }]
17});
18require(["xtext-resources/generated/mode-problem", "xtext/xtext-codemirror"], function(mode, xtext) {
19 window.xtextEditor = xtext.createEditor({baseUrl: baseUrl,});
20});