-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moved from Ace editor to Monaco editor #84
base: master
Are you sure you want to change the base?
Changes from 7 commits
47ad6db
365e70f
042e190
a96159e
8fbc16e
d75cd5c
13e819f
04761c4
7ee0215
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,10 +23,10 @@ | |
<link rel="stylesheet" type="text/css" href="lib/_npm/font-awesome/css/font-awesome.min.css" /> | ||
|
||
<script src="lib/_npm/requirejs/require.js"></script> | ||
|
||
<script src="lib/_npm/jquery/jquery.min.js"></script> | ||
<script src="lib/_npm/bootstrap/js/bootstrap.min.js"></script> | ||
<script src="lib/_npm/yamljs/yaml.js"></script> | ||
<script src="lib/_npm/ace/ace.js"></script> | ||
<script src="lib/_npm/monaco/loader.js"></script> | ||
|
||
<script src="js/autorefresh.js"></script> | ||
<script src="js/extensions.js"></script> | ||
|
@@ -37,9 +37,28 @@ | |
["bowser", "jstree", "localforage", "goldenlayout", "vue", "kaitai-struct-compiler", "dateformat"].forEach( | ||
name => paths[name] = `../../lib/_npm/${name}/${name}`); | ||
paths["big-integer"] = "../../lib/_npm/BigInteger/BigInteger"; | ||
paths["vs"] = "../../lib/_npm/monaco"; | ||
|
||
requirejs.config({ baseUrl: "js/v1/", paths: paths }); | ||
require(["app.unsupportedBrowser"]); | ||
require(["../../lib/_npm/js-yaml/js-yaml"], (YAML) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if require.js can be dropped and ECMAScript modules used instead. |
||
window.YAML = YAML; | ||
}); | ||
require(["vs/editor/editor.main"], () => { | ||
require(["vs/language/yaml/monaco.contribution", "vs/language/yaml/ksySchema"], () => { | ||
monaco.languages.yaml.yamlDefaults.setDiagnosticsOptions({ | ||
enableSchemaRequest: true, | ||
validate: true, | ||
schemas: [ | ||
{ | ||
uri: `http://myserver/ksy-schema.json`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahem, http://myserver/ ? |
||
fileMatch: [monaco.Uri.parse("inmemory://model/main").toString()], | ||
schema: ksySchema | ||
} | ||
] | ||
}); | ||
}) | ||
}); | ||
require(["jstree", "app"]); | ||
</script> | ||
</head> | ||
|
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Um, what are you doing here, and what are these "critical files"? If I'm not mistaken, the very idea is that
lib/_npm
should be populated during project build, and not kept in this repo.