(file)
| 15 | if (!scriptPath.endsWith("/")) scriptPath += "/"; |
| 16 | //console.log(scriptPath); |
| 17 | function loadScript(file) { |
| 18 | return new Promise(function(resolve) { |
| 19 | let script = document.createElement("script"); |
| 20 | script.src = function() { |
| 21 | if ("undefined" != typeof EJS_paths && typeof EJS_paths[file] === "string") { |
| 22 | return EJS_paths[file]; |
| 23 | } else if (file.endsWith("emulator.min.js")) { |
| 24 | return scriptPath + file; |
| 25 | } else { |
| 26 | return scriptPath + "src/" + file; |
| 27 | } |
| 28 | }(); |
| 29 | script.onload = resolve; |
| 30 | script.onerror = () => { |
| 31 | filesmissing(file).then(e => resolve()); |
| 32 | } |
| 33 | document.head.appendChild(script); |
| 34 | }) |
| 35 | } |
| 36 | |
| 37 | function loadStyle(file) { |
| 38 | return new Promise(function(resolve) { |
no test coverage detected
searching dependent graphs…