Merge remote-tracking branch 'ui/master'

This commit is contained in:
Zaid Abdulla committed 2018-12-27 22:22:44 -08:00
commit 4530967b6b
70 files changed
+10951 -8

No files matched your search

+36
View File
@@ -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 };