Merge remote-tracking branch 'ui/master'
This commit is contained in:
commit
4530967b6b
70 files changed
+10951
-8
No files matched your search
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
let codeMirror;
|
||||
let yaml;
|
||||
|
||||
function loadCodeMirror() {
|
||||
if (codeMirror) return Promise.resolve();
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const promises = [
|
||||
import(/* webpackChunkName: "codemirror" */ "codemirror"),
|
||||
import(/* webpackChunkName: "codemirror" */ "codemirror/mode/javascript/javascript")
|
||||
];
|
||||
Promise.all(promises)
|
||||
.then(modules => {
|
||||
codeMirror = modules[0];
|
||||
resolve();
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
|
||||
function loadYaml() {
|
||||
if (yaml) return Promise.resolve();
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
import(/* webpackChunkName: "yaml" */ "yaml")
|
||||
.then(module => {
|
||||
yaml = module;
|
||||
resolve();
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
|
||||
export { loadCodeMirror, codeMirror, loadYaml, yaml };
|
||||
Reference in new issue
Block a user