forked from microsoft/PowerToys
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerateLanguagesJson.html
More file actions
32 lines (29 loc) · 1.05 KB
/
generateLanguagesJson.html
File metadata and controls
32 lines (29 loc) · 1.05 KB
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
<!doctype Html>
<html>
<head>
<meta charset="utf-8">
<title>Monaco Preview Handler monaco_languages.json generator</title>
<script src="monacoSRC/min/vs/loader.js"></script>
<script src="monacoSpecialLanguages.js" type="module"></script>
<script type="module">
import {registerAdditionalLanguages} from "./monacoSpecialLanguages.js"
function download(filename, text) {
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
element.setAttribute('download', filename);
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}
require.config({ paths: { vs: 'monacoSRC/min/vs' } });
require(['vs/editor/editor.main'], async function () {
await registerAdditionalLanguages(monaco);
download("monaco_languages.json", "{\"list\":"+ JSON.stringify(monaco.languages.getLanguages())+"}");
});
</script>
</head>
<body>
<div id="container"></div>
</body>
</html>